From ba68b6b2335535079c92a0153024a4bff533d2be Mon Sep 17 00:00:00 2001 From: David Perl Date: Fri, 31 Jul 2026 12:23:20 +0200 Subject: [PATCH] fix: pxi and pxiii tests shouldn't work yet --- tests/unit/utils/test_beamline_dispatch.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/unit/utils/test_beamline_dispatch.py b/tests/unit/utils/test_beamline_dispatch.py index 17336a56..fa53ef6f 100644 --- a/tests/unit/utils/test_beamline_dispatch.py +++ b/tests/unit/utils/test_beamline_dispatch.py @@ -26,8 +26,9 @@ def test_simulated_dispatch_can_be_instantiated(): @pytest.mark.skipif(importlib.util.find_spec("pxi_bec") is None, reason="run only for pxi flavour") def test_pxi_dispatch_can_be_instantiated(): with patch.dict("os.environ", {"BEAMLINE": "X06SA"}): - dispatch = get_beamline_dispatch() - assert isinstance(dispatch, X06saDispatch) + with pytest.raises(TypeError) as e: + _ = get_beamline_dispatch() + assert e.match("Can't instantiate abstract class") @pytest.mark.skipif( @@ -44,5 +45,6 @@ def test_pxii_dispatch_can_be_instantiated(): ) def test_pxiii_dispatch_can_be_instantiated(): with patch.dict("os.environ", {"BEAMLINE": "X06DA"}): - dispatch = get_beamline_dispatch() - assert isinstance(dispatch, X06daDispatch) + with pytest.raises(TypeError) as e: + _ = get_beamline_dispatch() + assert e.match("Can't instantiate abstract class")