mtl-aas/mtl/test_params.py
Marcell Vazquez-Chanlatte 472fd45ce2 Integrate attr libraries
2018-09-17 22:43:21 -07:00

16 lines
418 B
Python

import mtl
from mtl.hypothesis import MetricTemporalLogicStrategy
import hypothesis.strategies as st
from hypothesis import given
@given(st.integers(), st.integers(), st.integers())
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[{'a': a, 'b': b}]
assert phi2.params == set()
assert phi2 == mtl.parse(f'G[{a}, {b}](x)')