Skip to content

Commit

Permalink
outlined the tests to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Sep 23, 2024
1 parent d9fe7be commit 4689839
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/beamlines/unit_tests/test_p38.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os

import pytest

from dodal.common.beamlines import beamline_utils
from dodal.devices.i22.nxsas import NXSasOAV

Expand All @@ -11,3 +13,20 @@ def test_devices_diff_when_in_lab():
beamline_utils.clear_devices()
saxs = i22.saxs(wait_for_connection=False, fake_with_ophyd_sim=True)
assert saxs.__class__ == NXSasOAV, f"Expected NXSasOav, got {saxs.__class__}"


# todo fix the following tests
# FAILED tests/beamlines/unit_tests/test_i03.py::test_list - KeyError: "No beamline parameter path found, maybe 'BEAMLINE' environment variable is not set!"
# FAILED tests/beamlines/unit_tests/test_p38.py::test_devices_diff_when_in_lab - AssertionError: Expected NXSasOav, got <class 'dodal.devices.i22.nxsas.NXSasPilatus'>
# assert <class 'dodal.devices.i22.nxsas.NXSasPilatus'> == NXSasOAV
# + where <class 'dodal.devices.i22.nxsas.NXSasPilatus'> = <dodal.devices.i22.nxsas.NXSasPilatus object at 0x7f016ca5b340>.__class__


@pytest.mark.parametrize("module_and_devices_for_beamline", ["p38"], indirect=True)
def test_device_creation(RE, module_and_devices_for_beamline):
_, devices = module_and_devices_for_beamline
saxs: NXSasOAV = devices["saxs"] # type: ignore

print(saxs)
assert saxs.prefix == "BL24I-MO-VGON-01:"
assert saxs.kappa.prefix == "BL24I-MO-VGON-01:KAPPA"

0 comments on commit 4689839

Please sign in to comment.