Example #1
0
 def test_no_version(self, experiment_registry, experiment_data):
     registries = RegistryContainer(experiment_registry)
     registries.lock_version(type(experiment_data), 10)
     with pytest.raises(RuntimeError) as excinfo:
         registries._obj_to_h5preserve(experiment_data)
     assert (
         "<class 'conftest.Experiment'> does not have version 10." == str(
             excinfo.value))
Example #2
0
 def test_version(self, experiment_registry, experiment_data):
     registries = RegistryContainer(experiment_registry)
     registries.lock_version(type(experiment_data), 1)
     assert registries._obj_to_h5preserve(experiment_data)._version == 1
Example #3
0
 def test_no_version(self, experiment_registry, experiment_data):
     registries = RegistryContainer(experiment_registry)
     registries.lock_version(type(experiment_data), 10)
     with pytest.raises(RuntimeError) as excinfo:
         registries._obj_to_h5preserve(experiment_data)
     assert "<class 'conftest.Experiment'> does not have version 10." == str(excinfo.value)
Example #4
0
 def test_version(self, experiment_registry, experiment_data):
     registries = RegistryContainer(experiment_registry)
     registries.lock_version(type(experiment_data), 1)
     assert registries._obj_to_h5preserve(experiment_data)._version == 1