Merge branch 'master' into fix/221-until-slicing

This commit is contained in:
Gaudeval 2021-01-06 11:16:07 +00:00
commit bbb187f26c
5 changed files with 146 additions and 129 deletions

View file

@ -1,3 +1,5 @@
from discrete_signals import signal
import mtl
@ -22,6 +24,16 @@ def test_eval_regression_next_neg():
assert min(t for t, _ in v) >= 0
def test_eval_with_signal():
spec = mtl.parse('F(above_three)')
raw_data = signal([(0, 1), (1, 2), (2, 3)], start=0, end=10, tag='a')
processed = raw_data.map(lambda val: val['a'] > 3, tag="above_three")
assert not spec(processed, quantitative=False)
assert spec(processed, quantitative=True) == 0
def test_eval_regression_until_start():
"""From issue #221"""
x = {