From 58c0ad2a302539c315b37c2dab687566de9f30f8 Mon Sep 17 00:00:00 2001 From: Naoto Mizuno Date: Tue, 3 Oct 2023 16:29:49 +0900 Subject: [PATCH] Fix missing assert --- .../tpe_tests/test_multi_objective_sampler.py | 2 +- tests/samplers_tests/tpe_tests/test_sampler.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/samplers_tests/tpe_tests/test_multi_objective_sampler.py b/tests/samplers_tests/tpe_tests/test_multi_objective_sampler.py index 5c8d97fb34..4a58eee10b 100644 --- a/tests/samplers_tests/tpe_tests/test_multi_objective_sampler.py +++ b/tests/samplers_tests/tpe_tests/test_multi_objective_sampler.py @@ -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: diff --git a/tests/samplers_tests/tpe_tests/test_sampler.py b/tests/samplers_tests/tpe_tests/test_sampler.py index 5973f22721..d54491c79d 100644 --- a/tests/samplers_tests/tpe_tests/test_sampler.py +++ b/tests/samplers_tests/tpe_tests/test_sampler.py @@ -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"]) @@ -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"]) @@ -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(