File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88from dodal .common .beamlines .beamline_parameters import get_beamline_parameters
99from dodal .common .beamlines .beamline_utils import set_beamline as set_utils_beamline
10+ from dodal .common .beamlines .beamline_utils import set_path_provider
11+ from dodal .common .beamlines .commissioning_mode import set_commissioning_signal
1012from dodal .common .udc_directory_provider import PandASubpathProvider
1113from dodal .device_manager import DeviceManager
1214from dodal .devices .aperturescatterguard import (
8587@devices .fixture
8688@cache
8789def path_provider () -> PathProvider :
88- return PandASubpathProvider ()
90+ provider = PandASubpathProvider ()
91+ set_path_provider (provider )
92+ return provider
8993
9094
9195@devices .fixture
@@ -333,7 +337,9 @@ def qbpm() -> QBPM:
333337
334338@devices .factory ()
335339def baton () -> Baton :
336- return Baton (f"{ PREFIX .beamline_prefix } -CS-BATON-01:" )
340+ _baton = Baton (f"{ PREFIX .beamline_prefix } -CS-BATON-01:" )
341+ set_commissioning_signal (_baton .commissioning )
342+ return _baton
337343
338344
339345@devices .factory ()
Original file line number Diff line number Diff line change 1+ import pytest
2+ from ophyd_async .core import set_mock_value
3+
4+ from dodal .common .beamlines .beamline_utils import get_path_provider
5+ from dodal .common .beamlines .commissioning_mode import read_commissioning_mode
6+
7+
8+ @pytest .mark .timeout (2 )
9+ @pytest .mark .parametrize ("module_and_devices_for_beamline" , ["i03" ], indirect = True )
10+ def test_i03_initialises_path_provider (module_and_devices_for_beamline ):
11+ assert get_path_provider ()
12+
13+
14+ @pytest .mark .timeout (2 )
15+ @pytest .mark .parametrize ("module_and_devices_for_beamline" , ["i03" ], indirect = True )
16+ def test_i03_initialises_commissioning_mode_signal (module_and_devices_for_beamline ):
17+ _ , devices , __ = module_and_devices_for_beamline
18+ set_mock_value (devices ["baton" ].commissioning , True )
19+ assert read_commissioning_mode ()
You can’t perform that action at this time.
0 commit comments