-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed
beamline_connected
pytest fixture, and restored
``titleize`` function to haven.utils.
- Loading branch information
1 parent
3e60f1b
commit f8959a5
Showing
8 changed files
with
21 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ | |
import argparse | ||
import logging | ||
import os | ||
from contextlib import contextmanager | ||
from copy import deepcopy | ||
from pathlib import Path | ||
from pprint import pprint | ||
from typing import Optional, Sequence | ||
|
@@ -99,21 +97,6 @@ def print_config_value(args: Sequence[str] = None): | |
print(value) | ||
|
||
|
||
@contextmanager | ||
def beamline_connected(is_connected=True): | ||
global _local_overrides | ||
# Save old value | ||
old_dict = deepcopy(_local_overrides) | ||
# Set temporary value | ||
if "beamline" not in _local_overrides.keys(): | ||
_local_overrides["beamline"] = {} | ||
_local_overrides["beamline"]["hardware_is_present"] = is_connected | ||
# Return to enclosing code | ||
yield | ||
# Restore old value | ||
_local_overrides = old_dict | ||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
# :author: Mark Wolfman | ||
# :email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,13 +43,16 @@ def test_roi_size(xspress): | |
|
||
|
||
def test_make_xspress_device(): | ||
xspress = make_xspress_device(name="xspress", prefix="255id_xsp:", num_elements=3, mock=True) | ||
xspress = make_xspress_device( | ||
name="xspress", prefix="255id_xsp:", num_elements=3, mock=True | ||
) | ||
xspress.wait_for_connection() | ||
assert xspress.name == "xspress" | ||
assert xspress.prefix == "255id_xsp:" | ||
assert hasattr(xspress.mcas, "mca2") | ||
assert not hasattr(xspress.mcas, "mca3") | ||
|
||
|
||
# ----------------------------------------------------------------------------- | ||
# :author: Mark Wolfman | ||
# :email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.