continue refactoring to optimize for mtl
This commit is contained in:
parent
5fd66cfd2c
commit
98824c9ba1
21 changed files with 393 additions and 467 deletions
22
mtl/test_parser.py
Normal file
22
mtl/test_parser.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from hypothesis import event, given
|
||||
|
||||
import mtl
|
||||
from mtl.hypothesis import MetricTemporalLogicStrategy
|
||||
|
||||
|
||||
@given(MetricTemporalLogicStrategy)
|
||||
def test_invertable_repr(phi):
|
||||
event(str(phi))
|
||||
assert str(phi) == str(mtl.parse(str(phi)))
|
||||
|
||||
|
||||
@given(MetricTemporalLogicStrategy)
|
||||
def test_hash_inheritance(phi):
|
||||
assert hash(repr(phi)) == hash(phi)
|
||||
|
||||
|
||||
def test_sugar_smoke():
|
||||
mtl.parse('(x <-> x)')
|
||||
mtl.parse('(x -> x)')
|
||||
mtl.parse('(x ^ x)')
|
||||
Loading…
Add table
Add a link
Reference in a new issue