From 233808f1eeae836a6c5913e71567ea31159cb8da Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 4 Jan 2023 13:53:41 +0100 Subject: [PATCH] testing: fixing relation of fixture --- tests/lib/testing_classes.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 58684314fa..2bafa16971 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -95,6 +95,15 @@ class ModuleUnitTest(BaseTest): print("Removing {}".format(tmpdir)) shutil.rmtree(tmpdir) + @pytest.fixture(scope="module") + def output_folder_url(self, download_test_data): + """Returns location of published data, cleans it first if exists.""" + path = os.path.join(download_test_data, "output") + if os.path.exists(path): + print("Purging {}".format(path)) + shutil.rmtree(path) + yield path + @pytest.fixture(scope="module") def env_var(self, monkeypatch_session, download_test_data): """Sets temporary env vars from json file.""" @@ -249,15 +258,6 @@ class PublishTest(ModuleUnitTest): yield "{}/{}".format(self.APP_GROUP, app_variant) - @pytest.fixture(scope="module") - def output_folder_url(self, download_test_data): - """Returns location of published data, cleans it first if exists.""" - path = os.path.join(download_test_data, "output") - if os.path.exists(path): - print("Purging {}".format(path)) - shutil.rmtree(path) - yield path - @pytest.fixture(scope="module") def app_args(self, download_test_data): """Returns additional application arguments from a test file.