Skip to content

Commit

Permalink
Fix missing assert
Browse files Browse the repository at this point in the history
  • Loading branch information
not522 committed Oct 3, 2023
1 parent ce93d40 commit 58c0ad2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def test_split_complete_trials_multi_objective(direction0: str, direction1: str)

def test_split_complete_trials_multi_objective_empty() -> None:
study = optuna.create_study(directions=("minimize", "minimize"))
_tpe.sampler._split_complete_trials_multi_objective([], study, 0) == ([], [])
assert _tpe.sampler._split_complete_trials_multi_objective([], study, 0) == ([], [])


def test_calculate_nondomination_rank() -> None:
Expand Down
6 changes: 3 additions & 3 deletions tests/samplers_tests/tpe_tests/test_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def test_split_complete_trials_single_objective(direction: str) -> None:

def test_split_complete_trials_single_objective_empty() -> None:
study = optuna.create_study()
_tpe.sampler._split_complete_trials_single_objective([], study, 0) == ([], [])
assert _tpe.sampler._split_complete_trials_single_objective([], study, 0) == ([], [])


@pytest.mark.parametrize("direction", ["minimize", "maximize"])
Expand Down Expand Up @@ -881,7 +881,7 @@ def test_split_pruned_trials(direction: str) -> None:

def test_split_pruned_trials_empty() -> None:
study = optuna.create_study()
_tpe.sampler._split_pruned_trials([], study, 0) == ([], [])
assert _tpe.sampler._split_pruned_trials([], study, 0) == ([], [])


@pytest.mark.parametrize("direction", ["minimize", "maximize"])
Expand All @@ -906,7 +906,7 @@ def test_split_infeasible_trials(direction: str) -> None:


def test_split_infeasible_trials_empty() -> None:
_tpe.sampler._split_infeasible_trials([], 0) == ([], [])
assert _tpe.sampler._split_infeasible_trials([], 0) == ([], [])


def frozen_trial_factory(
Expand Down

0 comments on commit 58c0ad2

Please sign in to comment.