Skip to content

Commit

Permalink
Patch out more plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Jan 31, 2025
1 parent 3d4fe17 commit 10a0de2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_tutorials.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import importlib
import os
import re
import time
from pathlib import Path
Expand Down Expand Up @@ -30,12 +29,12 @@ def expected_scan_output():

@pytest.mark.parametrize("module", ["ophyd_async.sim", "ophyd_async.epics.demo"])
def test_implementing_devices(module, capsys, expected_scan_output):
# We want the text output of the best effort callback, but the plotting takes
# too much time for CI, even if headless, so disable it
os.environ.pop("MPLBACKEND", None)
with patch("bluesky.run_engine.autoawait_in_bluesky_event_loop") as autoawait:
main = importlib.import_module(f"{module}.__main__")
autoawait.assert_called_once_with()
# We want the text output of the best effort callback, but the plotting takes
# too much time for CI, even if headless, so disable it
main.bec._set_up_plots = lambda *args, **kwargs: None
RE: RunEngine = main.RE
for motor in [main.stage.x, main.stage.y]:
RE(main.bps.mv(motor.velocity, 1000))
Expand Down

0 comments on commit 10a0de2

Please sign in to comment.