make ast objects easier to work with

This commit is contained in:
Marcell Vazquez-Chanlatte 2017-10-31 18:29:31 -07:00
parent 2640728288
commit 7d8cf78222
5 changed files with 131 additions and 128 deletions

View file

@ -9,3 +9,8 @@ from stl.hypothesis import SignalTemporalLogicStrategy
def test_invertable_repr(phi):
event(str(phi))
assert str(phi) == str(stl.parse(str(phi)))
@given(SignalTemporalLogicStrategy)
def test_hash_inheritance(phi):
assert hash(repr(phi)) == hash(phi)