From 638be26d6b6e4b44aeaeee327dad403b074d095f Mon Sep 17 00:00:00 2001 From: Carsten Knoll Date: Sun, 12 Nov 2023 19:15:27 +0100 Subject: [PATCH] fix tests on CI --- tests/settings.py | 5 ----- tests/test_core.py | 8 ++------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/settings.py b/tests/settings.py index 4b2deb9..7f4155e 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -23,11 +23,6 @@ # path for basic (staged) test data TEST_DATA_DIR1 = pjoin(ERK_ROOT_DIR, "pyerk-core", "tests", "test_data") -# path for "realistic" test data - -# taking this from envvar allows to flexibly use other test-data during debugging -TEST_DATA_PARENT_PATH = os.getenv("PYERK_TEST_DATA_PARENT_PATH", default=pjoin(ERK_ROOT_DIR, "erk-data-for-unittests")) - TEST_DATA_PATH2 = pjoin(TEST_DATA_DIR1, "ocse_subset", "control_theory1.py") TEST_DATA_PATH_MA = pjoin(TEST_DATA_DIR1, "ocse_subset", "math1.py") diff --git a/tests/test_core.py b/tests/test_core.py index 878a57a..209a212 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -20,7 +20,6 @@ from .settings import ( ERK_ROOT_DIR, TEST_DATA_DIR1, - TEST_DATA_PARENT_PATH, TEST_DATA_PATH2, TEST_DATA_PATH_MA, TEST_DATA_PATH3, @@ -177,17 +176,14 @@ def test_c02__exception_handling(self): os.environ.pop("PYERK_TRIGGER_TEST_EXCEPTION") -# noinspection PyPep8Naming +@unittest.skipIf(os.environ.get("CI"), "Skipping directory structure tests on CI") class Test_01_Core(HouskeeperMixin, unittest.TestCase): def test_a01__directory_structure(self): pyerk_dir = pjoin(ERK_ROOT_DIR, "pyerk-core") django_gui_dir = pjoin(ERK_ROOT_DIR, "pyerk-django") self.assertTrue(os.path.isdir(pyerk_dir)) - # since there is no reason to have the django gui in this repos CI: - if os.environ.get("CI") != "true": - self.assertTrue(os.path.isdir(django_gui_dir)) - self.assertTrue(os.path.isdir(TEST_DATA_PARENT_PATH)) + self.assertTrue(os.path.isdir(django_gui_dir)) def test_a01__test_independence(self): """