Skip to content

Commit 55d8581

Browse files
Rename scanspec file (#1640)
* Rename file to avoid issues * Rename after discussion * Added test for scanspec import --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk>
1 parent 1260411 commit 55d8581

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/dodal/plans/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .scanspec import spec_scan
1+
from .spec_path import spec_scan
22
from .wrapped import count
33

44
__all__ = ["count", "spec_scan"]

system_tests/test_cli.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import os
12
import subprocess
23
import sys
34

45
import pytest
56

7+
import dodal.plans.save_panda as save_panda
68
from dodal import __version__
79

810

@@ -29,3 +31,18 @@ def test_save_panda_error_if_no_beamline_set():
2931
res = subprocess.getstatusoutput(cmd_str)
3032
assert res[0] == expected_exit_code
3133
assert res[1] == "BEAMLINE not set and --beamline not specified"
34+
35+
36+
def test_can_run_save_panda_outside_entry_point():
37+
path = os.path.abspath(save_panda.__file__)
38+
result = subprocess.run(
39+
[
40+
sys.executable,
41+
os.path.basename(path),
42+
"--help",
43+
],
44+
cwd=os.path.dirname(path),
45+
capture_output=True,
46+
text=True,
47+
)
48+
assert result.returncode == 0, result.stdout

0 commit comments

Comments
 (0)