Skip to content

Commit

Permalink
TST: test if 'is_plan' recognizes built-in Bluesky plans
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgav committed Sep 26, 2024
1 parent 13f0969 commit 2caf3d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bluesky_queueserver/manager/tests/test_profile_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -3760,7 +3760,7 @@ def test_construct_parameters_1(testmode, success, errmsg):
# ---------------------------------------------------------------------------------


def test_plans_from_nspace():
def test_plans_from_nspace_1():
"""
Function 'plans_from_nspace' is extracting a subset of callable items from the namespace
"""
Expand All @@ -3771,6 +3771,18 @@ def test_plans_from_nspace():
assert callable(plan), f"Plan '{name}' is not callable"


def test_plans_from_nspace_2():
"""
Function 'plans_from_nspace' is extracting a subset of callable items from the namespace
"""
pc_path = get_default_startup_dir()
nspace = load_profile_collection(pc_path)
plans = plans_from_nspace(nspace)
assert "mv" in plans
assert "mvr" in plans
assert "null" in plans


def test_devices_from_nspace():
"""
Function 'plans_from_nspace' is extracting a subset of callable items from the namespace
Expand Down
2 changes: 2 additions & 0 deletions bluesky_queueserver/profile_collection_sim/00-ophyd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# flake8: noqa
print(f"Loading file {__file__!r}")

# Import some built-in plans
from bluesky.plan_stubs import mv, mvr, null
from ophyd.sim import hw

# Import ALL simulated Ophyd objects in global namespace (borrowed from ophyd.sim)
Expand Down

0 comments on commit 2caf3d1

Please sign in to comment.