Skip to content

Commit 7e96402

Browse files
authored
Merge pull request #256 from ISISComputingGroup/ignore_re_cb_type
Ignore RE callback type in tests
2 parents a7e1b4e + 10de847 commit 7e96402

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

tests/callbacks/fitting/test_fit_logging_callback.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ def test_after_fitting_callback_writes_to_file_successfully_no_y_uncertainty(
3232
patch("ibex_bluesky_core.callbacks._fitting.os.makedirs"),
3333
):
3434
with patch("time.time", MagicMock(return_value=time)):
35-
RE(scan([invariant], mot, -1, 1, 3), [lf, lfl], rb_number="0")
35+
RE(
36+
scan([invariant], mot, -1, 1, 3),
37+
[lf, lfl], # pyright: ignore until https://github.com/bluesky/bluesky/issues/1938
38+
rb_number="0",
39+
)
3640

3741
assert m.call_args_list[0].args == (
3842
filepath / "0" / f"{node()}_motor_invariant_2024-10-04_13-43-43Z{postfix}.txt",
@@ -66,7 +70,10 @@ def test_fitting_callback_handles_no_rb_number_save(
6670
patch("ibex_bluesky_core.callbacks._fitting.os.makedirs"),
6771
):
6872
with patch("time.time", MagicMock(return_value=time)):
69-
RE(scan([invariant], mot, -1, 1, 3), [lf, lfl])
73+
RE(
74+
scan([invariant], mot, -1, 1, 3),
75+
[lf, lfl], # pyright: ignore until https://github.com/bluesky/bluesky/issues/1938
76+
)
7077

7178
assert m.call_args_list[0].args == (
7279
filepath / "Unknown RB" / f"{node()}_motor_invariant_2024-10-04_13-43-43Z{postfix}.txt",
@@ -95,7 +102,11 @@ def test_after_fitting_callback_writes_to_file_successfully_with_y_uncertainty(
95102
patch("ibex_bluesky_core.callbacks._fitting.os.makedirs"),
96103
):
97104
with patch("time.time", MagicMock(return_value=time)):
98-
RE(scan([invariant, uncertainty], mot, -1, 1, 3), [lf, lfl], rb_number="0")
105+
RE(
106+
scan([invariant, uncertainty], mot, -1, 1, 3),
107+
[lf, lfl], # pyright: ignore until https://github.com/bluesky/bluesky/issues/1938
108+
rb_number="0",
109+
)
99110

100111
assert m.call_args_list[0].args == (
101112
filepath / "0" / f"{node()}_motor_invariant_2024-10-04_13-43-43Z{postfix}.txt",
@@ -131,7 +142,11 @@ def test_file_not_written_if_no_fitting_result(RE: run_engine.RunEngine):
131142
patch("ibex_bluesky_core.callbacks._fitting.open", m),
132143
patch("ibex_bluesky_core.callbacks._fitting.os.makedirs"),
133144
):
134-
RE(scan([invariant], mot, -1, 1, 3), [lf, lfl], rb_number="0")
145+
RE(
146+
scan([invariant], mot, -1, 1, 3),
147+
[lf, lfl], # pyright: ignore until https://github.com/bluesky/bluesky/issues/1938
148+
rb_number="0",
149+
)
135150

136151
assert not m.called
137152

0 commit comments

Comments
 (0)