754642db5ff35be98e4b6fc3a17823482881cb27,tests/storages_tests/test_storages.py,,test_get_all_study_summaries,#Any#,546
Before Change
def test_get_all_study_summaries(storage_init_func):
// type: (Callable[[], BaseStorage]) -> None
storage = storage_init_func()
study_id = storage.create_new_study()
storage.set_study_direction(study_id, StudyDirection.MINIMIZE)
datetime_1 = datetime.now()
// Set up trial 1.
_create_new_trial_with_example_trial(
storage, study_id, EXAMPLE_DISTRIBUTIONS, EXAMPLE_TRIALS[0]
)
datetime_2 = datetime.now()
// Set up trial 2.
trial_id_2 = storage.create_new_trial(study_id)
storage.set_trial_value(trial_id_2, 2.0)
for key, value in EXAMPLE_ATTRS.items():
storage.set_study_user_attr(study_id, key, value)
After Change
summaries = storage.get_all_study_summaries()
assert len(summaries) == len(expected_summaries)
for summary in summaries:
expected_summary = expected_summaries[summary.study_id]
assert summary.study_id == expected_summary.study_id
assert summary.direction == expected_summary.direction
assert summary.datetime_start == expected_summary.datetime_start
assert summary.study_name == expected_summary.study_name
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: pfnet/optuna
Commit Name: 754642db5ff35be98e4b6fc3a17823482881cb27
Time: 2020-04-29
Author: ytsmiling@gmail.com
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_get_all_study_summaries
Project Name: pfnet/optuna
Commit Name: 280c4fb338bbb4cc967adfcc9714f05a606c6acf
Time: 2020-04-29
Author: ytsmiling@gmail.com
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_get_all_study_summaries
Project Name: pfnet/optuna
Commit Name: 280c4fb338bbb4cc967adfcc9714f05a606c6acf
Time: 2020-04-29
Author: ytsmiling@gmail.com
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_and_get_study_user_attrs
Project Name: pfnet/optuna
Commit Name: 754642db5ff35be98e4b6fc3a17823482881cb27
Time: 2020-04-29
Author: ytsmiling@gmail.com
File Name: tests/storages_tests/test_storages.py
Class Name:
Method Name: test_set_and_get_study_user_attrs