Integrate attr libraries

This commit is contained in:
Marcell Vazquez-Chanlatte 2018-09-17 22:43:21 -07:00
parent fb2e79b807
commit 472fd45ce2
9 changed files with 200 additions and 265 deletions

View file

@ -10,11 +10,7 @@ def test_params1(a, b, c):
phi = mtl.parse('G[a, b] x')
assert {x.name for x in phi.params} == {'a', 'b'}
phi2 = phi.set_params({'a': a, 'b': b})
phi2 = phi[{'a': a, 'b': b}]
assert phi2.params == set()
assert phi2 == mtl.parse(f'G[{a}, {b}](x)')
@given(MetricTemporalLogicStrategy)
def test_hash_stable(phi):
assert hash(phi) == hash(mtl.parse(str(phi)))