mtl-aas/mtl/test_params.py
Marcell Vazquez-Chanlatte 1b18efadfa flake8
2018-09-18 23:19:58 -07:00

14 lines
358 B
Python

import mtl
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)')