Skip to content

Commit

Permalink
fix tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cknoll committed Nov 12, 2023
1 parent 318ee8d commit 638be26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 2 additions & 6 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 638be26

Please sign in to comment.