Skip to content
Snippets Groups Projects

added option to change History.squeeze behavior

Merged David Schäfer requested to merge flag-aggregation into develop
Files
2
@@ -251,13 +251,13 @@ def test_append_force(__hist, s, max_val):
(pd.Series(4, index=range(6), dtype=float), {"last": 4, "min": 0, "max": 6}),
],
)
def test_aggregations(__hist, col, expected):
def test_aggregations(__hist, col, expected, hist=History(index=pd.Index(range(6)))):
import saqc.core.history
hist = __hist
hist.append(col)
check_invariants(hist)
for aggregation in ["last", "min", "max"]:
saqc.core.history.AGGREGATION = aggregation
hist._aggregation = aggregation
assert (hist.squeeze() == expected[aggregation]).all()
# reset to not disturb the other tests...
saqc.core.history.AGGREGATION = "last"
Loading