-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate p38 to i22 #862
base: main
Are you sure you want to change the base?
migrate p38 to i22 #862
Conversation
@pytest.fixture(scope="function")
def module_and_devices_for_beamline(request):
beamline = request.param
with patch.dict(os.environ, {"BEAMLINE": beamline}, clear=True):
bl_mod = importlib.import_module("dodal.beamlines." + beamline)
importlib.reload(bl_mod)
mock_beamline_module_filepaths(beamline, bl_mod)
devices, _ = make_all_devices(
bl_mod,
include_skipped=True,
fake_with_ophyd_sim=True,
)
yield (bl_mod, devices)
beamline_utils.clear_devices()
del bl_mod
the conftest is very opinionated and overriding it 'from the other file' seems impossible, the quick and easy way to fix is it to use another conftest, or add some param to the fixture to skip the os environ patch if it's a lab beamline @DominicOram , @callumforrester please share your perspectives |
e9fed56
to
6e611f2
Compare
Sorry, I'm not sure I understand. You can override the On a side-note I would be careful about merging this until we have fixed #864 as it could be masking errors. |
now probably this is just waiting for the connect and device_factory applied to the main branch again |
waiting for #921 |
Fixes #502
Instructions to reviewer on how to test:
BEAMLINE=p38 dodal connect i22
Checks for reviewer
dodal connect ${BEAMLINE}