f22c418d0d2c1a96c021905401875c46de4cf036,tests/storages_tests/rdb_tests/test_models.py,TestTrialValueModel,test_where_trial,#Any#,447
Before Change
@staticmethod
def test_where_trial(session: Session) -> None:
direction = StudyDirectionModel(direction=StudyDirection.MINIMIZE)
study = StudyModel(study_id=1, study_name="test-study", directions=[direction])
trial = TrialModel(trial_id=1, study_id=study.study_id, state=TrialState.COMPLETE)
session.add(TrialValueModel(trial_id=trial.trial_id, objective=0, value=10))
session.commit()
trial_values = TrialValueModel.where_trial(trial, session)
assert 1 == len(trial_values)
assert 0 == trial_values[0].objective
After Change
@staticmethod
def test_where_trial(session: Session) -> None:
_, trial = TestTrialValueModel._create_model(session)
trial_values = TrialValueModel.where_trial(trial, session)
assert 1 == len(trial_values)
assert 0 == trial_values[0].objective
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
Instances
Project Name: pfnet/optuna
Commit Name: f22c418d0d2c1a96c021905401875c46de4cf036
Time: 2020-11-30
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/storages_tests/rdb_tests/test_models.py
Class Name: TestTrialValueModel
Method Name: test_where_trial
Project Name: pfnet/optuna
Commit Name: f22c418d0d2c1a96c021905401875c46de4cf036
Time: 2020-11-30
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/storages_tests/rdb_tests/test_models.py
Class Name: TestTrialValueModel
Method Name: test_where_study
Project Name: pfnet/optuna
Commit Name: f22c418d0d2c1a96c021905401875c46de4cf036
Time: 2020-11-30
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/storages_tests/rdb_tests/test_models.py
Class Name: TestTrialValueModel
Method Name: test_where_trial
Project Name: pfnet/optuna
Commit Name: f22c418d0d2c1a96c021905401875c46de4cf036
Time: 2020-11-30
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/storages_tests/rdb_tests/test_models.py
Class Name: TestTrialValueModel
Method Name: test_all