def test_create_experiment(self): experiment = Experiment() metadata = create_experiment() experiment.create(metadata.name, metadata.author, metadata.date, self.tst_experiment_dir) t1 = os.path.isdir(os.path.join(self.tst_experiment_dir, 'myexperiment')) t2 = os.path.isfile(os.path.join(self.tst_experiment_dir, 'myexperiment', 'experiment.md.json')) t3 = os.path.isdir(os.path.join(self.tst_experiment_dir, 'myexperiment', 'data')) t4 = os.path.isfile(os.path.join(self.tst_experiment_dir, 'myexperiment', 'data', 'rawdataset.md.json')) self.assertTrue(t1*t2*t3*t4)
def _create_experiment(self): experiment = Experiment() metadata = create_experiment() experiment.create(metadata.name, metadata.author, metadata.date, self.tst_experiment_dir) return experiment