From 1fb90fd30194c57bbc69b74f1a64061a4c2028aa Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Thu, 5 Nov 2020 16:52:34 +0100 Subject: [PATCH] test update --- test/test_run_modules/test_training.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_run_modules/test_training.py b/test/test_run_modules/test_training.py index 84cc5f48..c2b58cbd 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") -- GitLab