Skip to content

Commit

Permalink
Fix broken tests for get_trial_id_from_study_id_trial_number storage …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
c-bata committed Aug 30, 2022
1 parent faed73c commit 584b18b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/study_tests/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,27 +1482,6 @@ def test_tell_duplicate_tell() -> None:
study.tell(trial, 1.0, skip_if_finished=False)


def test_tell_storage_not_implemented_trial_number() -> None:
with StorageSupplier("inmemory") as storage:

with patch.object(
storage,
"get_trial_id_from_study_id_trial_number",
side_effect=NotImplementedError,
):
study = create_study(storage=storage)

study.tell(study.ask(), 1.0)

# Storage missing implementation for method required to map trial numbers back to
# trial IDs.
with pytest.warns(UserWarning):
study.tell(study.ask().number, 1.0)

with pytest.raises(ValueError):
study.tell(study.ask().number + 1, 1.0)


@pytest.mark.parametrize("storage_mode", STORAGE_MODES)
def test_enqueued_trial_datetime_start(storage_mode: str) -> None:

Expand Down

0 comments on commit 584b18b

Please sign in to comment.