Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Fix accidentally broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicOram committed May 22, 2023
1 parent 5560719 commit fbbd6d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/artemis/parameters/tests/test_external_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ def test_beamline_parameters():
assert params["beamLineEnergy__adjustSlits"] is False


def test_get_beamline_parameters():
def test_get_beamline_parameters_works_with_no_environment_variable_set():
if environ.get("BEAMLINE"):
del environ["BEAMLINE"]
with pytest.raises(KeyError) as excinfo:
get_beamline_parameters()
assert "environment variable is not set" in str(excinfo.value)
assert get_beamline_parameters()


def test_get_beamline_parameters():
environ["BEAMLINE"] = "i03"
with patch.dict(
"artemis.parameters.beamline_parameters.BEAMLINE_PARAMETER_PATHS",
Expand Down

0 comments on commit fbbd6d4

Please sign in to comment.