f22c418d0d2c1a96c021905401875c46de4cf036,tests/storages_tests/rdb_tests/test_models.py,TestTrialIntermediateValueModel,test_all,#Any#,552

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(
            TrialIntermediateValueModel(trial_id=trial.trial_id, step=0, intermediate_value=10)
        )
        session.commit()

        trial_intermediate_values = TrialIntermediateValueModel.all(session)
        assert 1 == len(trial_intermediate_values)
        assert 0 == trial_intermediate_values[0].step

After Change


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

        _, _ = TestTrialIntermediateValueModel._create_model(session)
        trial_intermediate_values = TrialIntermediateValueModel.all(session)
        assert 1 == len(trial_intermediate_values)
        assert 0 == trial_intermediate_values[0].step
        assert 10 == trial_intermediate_values[0].intermediate_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: TestTrialIntermediateValueModel
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: TestTrialIntermediateValueModel
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: TestTrialIntermediateValueModel
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: TestTrialIntermediateValueModel
Method Name: test_where_study