diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bbcf7ed..1c7db54 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,4 +25,4 @@ jobs: pip install . - name: Run the tests run: | - python -m unittest + python -m unittest discover tests diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/test_easygdf.py b/tests/test_easygdf.py index 1104d16..d8afb00 100644 --- a/tests/test_easygdf.py +++ b/tests/test_easygdf.py @@ -6,7 +6,9 @@ import numpy as np import easygdf -from .utils import load_test_resource + +def load_test_resource(path): + return open(os.path.join(os.path.dirname(os.path.realpath(__file__)), path), "rb") class TestEasyGDFHelpers(unittest.TestCase): diff --git a/tests/test_initial_distribution.py b/tests/test_initial_distribution.py index 8cea882..353f228 100644 --- a/tests/test_initial_distribution.py +++ b/tests/test_initial_distribution.py @@ -6,7 +6,9 @@ import easygdf -from .utils import load_test_resource + +def load_test_resource(path): + return open(os.path.join(os.path.dirname(os.path.realpath(__file__)), path), "rb") class TestEasyGDFInitialDistribution(unittest.TestCase): diff --git a/tests/test_screens_touts.py b/tests/test_screens_touts.py index 7cf556e..a2d2718 100644 --- a/tests/test_screens_touts.py +++ b/tests/test_screens_touts.py @@ -4,7 +4,9 @@ import unittest import easygdf -from .utils import load_test_resource + +def load_test_resource(path): + return open(os.path.join(os.path.dirname(os.path.realpath(__file__)), path), "rb") class TestEasyGDFScreensTouts(unittest.TestCase): diff --git a/tests/utils.py b/tests/utils.py deleted file mode 100644 index 49c6bd8..0000000 --- a/tests/utils.py +++ /dev/null @@ -1,5 +0,0 @@ -import os - - -def load_test_resource(path): - return open(os.path.join(os.path.dirname(os.path.realpath(__file__)), path), "rb")