Skip to content
Snippets Groups Projects
Commit ad4ae081 authored by David Schäfer's avatar David Schäfer
Browse files

fixed tests

parent 0586093a
No related branches found
No related tags found
1 merge request!826added option to change History.squeeze behavior
Pipeline #204405 failed with stages
in 55 seconds
......@@ -13,12 +13,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
- Option to change the flagging scheme after initialization
- `flagByClick`: manually assign flags using a graphical user interface
- `SaQC`: support for selection, slicing and setting of items by use of subscription on SaQC objects (e.g. `qc[key]` and `qc[key] = value`).
Selection works with single keys, collections of keys and string slices (e.g. `qc["a":"f"]`). Values can be SaQC objects, pd.Series,
Selection works with single keys, collections of keys and string slices (e.g. `qc["a":"f"]`). Values can be SaQC objects, pd.Series,
Iterable of Series and dict-like with series values.
- `transferFlags` is a multivariate function
- `plot`: added `yscope` keyword
- `setFlags`: function to replace `flagManual`
- `flagUniLOF`: added defaultly applied correction to mitigate phenomenon of overflagging at relatively steep data value slopes. (parameter `slope_correct`).
- `flagUniLOF`: added defaultly applied correction to mitigate phenomenon of overflagging at relatively steep data value slopes. (parameter `slope_correct`).
- `History`: added option to change aggregation behavior
### Changed
### Removed
......
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment