Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jul 8, 2024
1 parent 2da2661 commit 0483a2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pioreactor/tests/test_execute_experiment_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,26 +232,26 @@ def test_execute_experiment_update_automation(mock__load_experiment_profile) ->


@patch("pioreactor.actions.leader.experiment_profile._load_experiment_profile")
def test_execute_experiment_start_automation_fails(
def test_execute_experiment_start_automation_succeeds(
mock__load_experiment_profile,
) -> None:
experiment = "_testing_experiment"
action = Start(hours_elapsed=0 / 60 / 60, options={"target_temperature": 20})
start = Start(hours_elapsed=0 / 60 / 60, options={"target_temperature": 20})
stop = Stop(hours_elapsed=2 / 60 / 60)

profile = Profile(
experiment_profile_name="test_profile",
common=CommonBlock(
jobs={
"temperature_automation": Job(actions=[action]),
"temperature_automation": Job(actions=[start, stop]),
}
),
metadata=Metadata(author="test_author"),
)

mock__load_experiment_profile.return_value = profile

with pytest.raises(ValueError, match="start"):
execute_experiment_profile("profile.yaml", experiment)
execute_experiment_profile("profile.yaml", experiment)


@pytest.mark.xfail(reason="need to write a good test for this")
Expand Down

0 comments on commit 0483a2c

Please sign in to comment.