Skip to content

Commit

Permalink
new build
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jul 8, 2024
1 parent bc9af39 commit cfd443e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pioreactor/experiment_profiles/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def expr(self, p) -> bool | float | str:
return convert_string(value)

else:
raise MQTTValueError(f"{p.UNIT_JOB_SETTING} does not exist for experiment `{experiment}`")
raise MQTTValueError(f"{data_string} does not exist for experiment `{experiment}`")


def parse_profile_expression_to_bool(profile_string: str, env=None) -> bool:
Expand Down
8 changes: 7 additions & 1 deletion pioreactor/tests/test_execute_experiment_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from pioreactor.actions.leader.experiment_profile import _verify_experiment_profile
from pioreactor.actions.leader.experiment_profile import execute_experiment_profile
from pioreactor.actions.leader.experiment_profile import hours_to_seconds
from pioreactor.actions.leader.experiment_profile import seconds_to_hours
from pioreactor.background_jobs.stirring import start_stirring
from pioreactor.experiment_profiles.profile_struct import _LogOptions
from pioreactor.experiment_profiles.profile_struct import CommonBlock
Expand All @@ -31,13 +32,18 @@
from pioreactor.utils.timing import current_utc_datetime


# First test the hours_to_seconds function
def test_hours_to_seconds() -> None:
assert hours_to_seconds(1) == 3600
assert hours_to_seconds(0.5) == 1800
assert hours_to_seconds(0) == 0


def test_seconds_to_hours() -> None:
assert seconds_to_hours(3600.0) == 1
assert seconds_to_hours(3600) == 1
assert seconds_to_hours(0) == 0


@patch("pioreactor.actions.leader.experiment_profile._load_experiment_profile")
def test_execute_experiment_profile_order(
mock__load_experiment_profile,
Expand Down

0 comments on commit cfd443e

Please sign in to comment.