File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class MachineConfig(BaseModel): # type: ignore
3030 # General info --------------------------------------------------------------------
3131 display_name : str = ""
3232 instrument_name : str = ""
33+ instrument_type : str = "" # For use with hierarchical config files
3334 image_path : Optional [Path ] = None
3435 machine_override : str = ""
3536
Original file line number Diff line number Diff line change @@ -183,6 +183,9 @@ def mock_standard_machine_config_yaml(
183183 "step_size" : 100 ,
184184 }
185185
186+ # Remove 'instrument_type' value (not needed in standard config)
187+ machine_config ["instrument_type" ] = ""
188+
186189 master_config = {
187190 "m01" : machine_config ,
188191 "m02" : machine_config ,
@@ -239,6 +242,11 @@ def test_get_machine_config(
239242 # General info
240243 assert config [i ].display_name == mock_instrument_config ["display_name" ]
241244 assert config [i ].image_path == Path (mock_instrument_config ["image_path" ])
245+ assert (
246+ config [i ].instrument_type == mock_instrument_config ["instrument_type" ]
247+ if config_to_test == "hierarchical"
248+ else not config [i ].instrument_type
249+ )
242250 # Hardware & software
243251 assert config [i ].camera == mock_instrument_config ["camera" ]
244252 assert config [i ].superres == mock_instrument_config ["superres" ]
You can’t perform that action at this time.
0 commit comments