Skip to content

Commit

Permalink
Removed redundant code to include the test db beamline.
Browse files Browse the repository at this point in the history
  • Loading branch information
janeliu-slac committed Nov 4, 2024
1 parent 5d33fae commit a3269e1
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions hutch_python/tests/test_happi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ def test_happi_objs():
logger.debug("test_happi_objs")
db = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'happi_db.json')
# patch lightpath configs to include test db beamline
conftest.beamlines['TST'] = ['X0']
conftest.sources.append('X0')
# Only select active objects
lc = get_lightpath(db, 'tst')
objs = get_happi_objs(db, lc, 'tst')
Expand All @@ -44,9 +41,6 @@ def test_load_level(load_level: DeviceLoadLevel, num_devices: int):
logger.debug("test_load_level")
db = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'happi_db.json')
# patch lightpath configs to include test db beamline
conftest.beamlines['TST'] = ['X0']
conftest.sources.append('X0')
# Only select active objects
lc = get_lightpath(db, 'tst')
objs = get_happi_objs(db, lc, 'tst', load_level=load_level)
Expand All @@ -71,9 +65,6 @@ def test_happi_objs_without_exclude_devices():
logger.debug("test_happi_objs")
db = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'happi_db.json')
# patch lightpath configs to include test db beamline
conftest.beamlines['TST'] = ['X0']
conftest.sources.append('X0')
# Only select active objects
lc = get_lightpath(db, 'tst')
# in DeviceLoadLevel.STANDARD you search happi and look for devices with same beamline name
Expand All @@ -87,9 +78,6 @@ def test_happi_objs_with_exclude_devices():
logger.debug("test_happi_objs")
db = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'happi_db.json')
# patch lightpath configs to include test db beamline
conftest.beamlines['TST'] = ['X0']
conftest.sources.append('X0')
# Only select active objects
lc = get_lightpath(db, 'tst')
# get devices not in excluded_devices list
Expand Down

0 comments on commit a3269e1

Please sign in to comment.