def test_write_empty_task_fails(self): task = KromatographyTask() with self.assertRaises(IOError): # Fail if writing in current dir: assert_file_roundtrip_identical(task) # But not when providing a regular folder as target: assert_file_roundtrip_identical(task, target_dir=HERE)
def test_modified_simple_datasource_via_list(self): # FIXME: adding to the datasource currently means adding to the # object_catalog, to the data catalog and the corresponding list new_comp = Component(name="New Component", charge=UnitScalar(0.0, units='1'), pKa=UnitScalar(0.0, units='1')) self.ds.set_object_of_type("components", new_comp) self.ds.make_clean() assert_file_roundtrip_identical(self.ds)
def test_write_empty_task(self): task = KromatographyTask() assert_file_roundtrip_identical(task)
def test_default_simple_datasource(self): assert_file_roundtrip_identical(self.ds)
def test_write_complete_study(self): # Ignore dirty flag on study datasource since currently not in use # Also ignore the datasource since it isn;t stored when storing a study assert_file_roundtrip_identical(self.study, ignore=['datasource', 'dirty'])
def test_write_non_empty_task(self): project = KromatographyProject(study=self.study) obj = KromatographyTask(project=project) # Ignore dirty flag on study datasource since currently not in use # Also ignore the datasource since it isn;t stored when storing a task assert_file_roundtrip_identical(obj, ignore=['datasource', 'dirty'])