diff --git a/test/test_run_modules/test_training.py b/test/test_run_modules/test_training.py index 84cc5f487b3fc77aedaff5ef12007a9ce1109821..c2b58cbd2160bd958c76ba67649ef8caba09fcb4 100644 --- a/test/test_run_modules/test_training.py +++ b/test/test_run_modules/test_training.py @@ -61,7 +61,8 @@ class TestTraining: obj.data_store.set("data_collection", mock.MagicMock(return_value="mock_train_gen"), "general.train") obj.data_store.set("data_collection", mock.MagicMock(return_value="mock_val_gen"), "general.val") obj.data_store.set("data_collection", mock.MagicMock(return_value="mock_test_gen"), "general.test") - os.makedirs(path) + if not os.path.exists(path): + os.makedirs(path) obj.data_store.set("experiment_path", path, "general") os.makedirs(batch_path) obj.data_store.set("batch_path", batch_path, "general") @@ -170,7 +171,8 @@ class TestTraining: @pytest.fixture def ready_to_init(self, data_collection, model, callbacks, path, model_path, batch_path): - os.makedirs(path) + if not os.path.exists(path): + os.makedirs(path) os.makedirs(model_path) obj = RunEnvironment() obj.data_store.set("data_collection", data_collection, "general.train")