diff --git a/tests/tests_bec_ipython_client/test_fov_bounds_match_scan_args.py b/tests/tests_bec_ipython_client/test_fov_bounds_match_scan_args.py index f5074b60..fcc3140f 100644 --- a/tests/tests_bec_ipython_client/test_fov_bounds_match_scan_args.py +++ b/tests/tests_bec_ipython_client/test_fov_bounds_match_scan_args.py @@ -18,6 +18,8 @@ strictly inside them -- not just checked once by hand -- so this class of import re from typing import get_type_hints +import csaxs_bec.bec_ipython_client.plugins.flomni.flomni as _flomni_cli_module +import csaxs_bec.bec_ipython_client.plugins.LamNI.lamni as _lamni_cli_module from csaxs_bec.bec_widgets.widgets.tomo_params.tomo_params import SETUP_PROFILES from csaxs_bec.scans.flomni_fermat_scan import FlomniFermatScan from csaxs_bec.scans.lamni_fermat_scan import LamniFermatScan @@ -62,9 +64,7 @@ def test_flomni_gui_fovx_fovy_within_scan_bounds(): def test_flomni_cli_fovy_bounds_within_scan_bounds(): - src = open( - "csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py", encoding="utf-8" - ).read() + src = open(_flomni_cli_module.__file__, encoding="utf-8").read() m = re.search(r'" um".*?min_=([\d.]+), max_=([\d.]+)', src, re.DOTALL) assert m, "could not find the fovy _get_val() call in flomni.py -- did it move?" cli_min, cli_max = float(m.group(1)), float(m.group(2)) @@ -81,7 +81,7 @@ def test_lamni_gui_piezo_range_within_scan_bounds(): def test_lamni_cli_piezo_range_bounds_within_scan_bounds(): - src = open("csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py", encoding="utf-8").read() + src = open(_lamni_cli_module.__file__, encoding="utf-8").read() for axis, scan_param in (("X", "fovx"), ("Y", "fovy")): m = re.search( rf'" um".*?min_=([\d.]+), max_=([\d.]+)', src, re.DOTALL