Skip to content

Commit 7fabab3

Browse files
fix tests
1 parent ea4b1a4 commit 7fabab3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/tests/test_calibration_sessions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_protocols_expose_step_registries_and_start_sessions() -> None:
192192
assert "intro_confirm_1" in pump_protocol.step_registry
193193
assert callable(getattr(pump_protocol, "start_session", None))
194194

195-
standards_protocol = get_protocol(pt.OD_DEVICES[0], "standards")
195+
standards_protocol = get_protocol(pt.OD_DEVICES[1], "standards")
196196
assert isinstance(standards_protocol.step_registry, dict)
197197
assert "intro" in standards_protocol.step_registry
198198
assert callable(getattr(standards_protocol, "start_session", None))

core/tests/test_od_fusion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@ def test_fusion_model_predicts_expected_concentration_range() -> None:
105105
def test_estimator_roundtrip_save_and_load(tmp_path, monkeypatch) -> None:
106106
monkeypatch.setenv("DOT_PIOREACTOR", str(tmp_path))
107107

108-
import pioreactor.estimators as estimators_module
109-
110108
estimator = _build_estimator_from_records(_records_for_instrument("1")) # type: ignore
111-
saved_path = estimators_module.save_estimator(pt.OD_FUSED_DEVICE, estimator)
109+
saved_path = estimator.save_to_disk_for_device(pt.OD_FUSED_DEVICE)
112110
assert estimator.estimator_name in saved_path
113111

112+
import pioreactor.estimators as estimators_module
113+
114114
loaded = estimators_module.load_estimator(pt.OD_FUSED_DEVICE, estimator.estimator_name)
115115
assert isinstance(loaded, structs.ODFusionEstimator)
116116
assert loaded.estimator_name == estimator.estimator_name
117117
assert loaded.angles == estimator.angles
118118

119-
estimators_module.set_active_estimator(pt.OD_FUSED_DEVICE, estimator.estimator_name)
119+
estimator.set_as_active_calibration_for_device(pt.OD_FUSED_DEVICE)
120120
active = estimators_module.load_active_estimator(pt.OD_FUSED_DEVICE)
121121
assert active is not None
122122
assert active.estimator_name == estimator.estimator_name

0 commit comments

Comments
 (0)