f22c418d0d2c1a96c021905401875c46de4cf036,tests/storages_tests/rdb_tests/test_models.py,TestTrialValueModel,test_all,#Any#,462

Before Change


    @staticmethod
    def test_all(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.all(session)
        assert 1 == len(trial_values)
        assert 0 == trial_values[0].objective

After Change


    @staticmethod
    def test_all(session: Session) -> None:

        _, _ = TestTrialValueModel._create_model(session)
        trial_values = TrialValueModel.all(session)
        assert 1 == len(trial_values)
        assert 0 == trial_values[0].objective
        assert 10 == trial_values[0].value
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 18

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_all


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


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