diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index 7ef06084..3e28bca4 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -27,4 +27,4 @@ jobs: python3 -m pip install coverage - name: Run tests - run: coverage run test/run_integration_tests.py + run: coverage run --source=spatialpy test/run_integration_tests.py diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index cabdc656..cebbd7b8 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -25,4 +25,4 @@ jobs: python3 -m pip install coverage - name: Run tests - run: coverage run test/run_unit_tests.py + run: coverage run --source=spatialpy test/run_unit_tests.py diff --git a/run_coverage.sh b/run_coverage.sh new file mode 100755 index 00000000..b566b0e3 --- /dev/null +++ b/run_coverage.sh @@ -0,0 +1,7 @@ +#!/bin/bash +#pip3 install coverage +#pip3 install python-libsbml + +coverage run --source=spatialpy test/run_unit_tests.py -m develop +coverage run --source=spatialpy test/run_integration_tests.py -m develop +coverage html diff --git a/test/run_unit_tests.py b/test/run_unit_tests.py index 48e360cc..8c994dca 100755 --- a/test/run_unit_tests.py +++ b/test/run_unit_tests.py @@ -28,9 +28,9 @@ print('Running unit tests in develop mode. Appending repository directory to system path.') sys.path.append(os.path.join(os.path.dirname(__file__), '..')) - import test_species - import test_parameter - import test_reaction + from unit_tests import test_species + from unit_tests import test_parameter + from unit_tests import test_reaction modules = [ test_species, diff --git a/test/unit_tests/__init__.py b/test/unit_tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/test_parameter.py b/test/unit_tests/test_parameter.py similarity index 100% rename from test/test_parameter.py rename to test/unit_tests/test_parameter.py diff --git a/test/test_reaction.py b/test/unit_tests/test_reaction.py similarity index 100% rename from test/test_reaction.py rename to test/unit_tests/test_reaction.py diff --git a/test/test_species.py b/test/unit_tests/test_species.py similarity index 100% rename from test/test_species.py rename to test/unit_tests/test_species.py