(self)
| 6 | class TestOptuna(unittest.TestCase): |
| 7 | |
| 8 | def test_study(self): |
| 9 | |
| 10 | def objective(trial): |
| 11 | x = trial.suggest_uniform('x', -1., 1.) |
| 12 | return x ** 2 |
| 13 | |
| 14 | n_trials = 20 |
| 15 | study = optuna.create_study() |
| 16 | study.optimize(objective, n_trials=n_trials) |
| 17 | self.assertEqual(len(study.trials), n_trials) |
nothing calls this directly
no outgoing calls
no test coverage detected