From d1287cddfb27a47f9674558caa3a42243d73da2d Mon Sep 17 00:00:00 2001 From: Christian Chapman-Bird Date: Wed, 20 Nov 2024 11:34:16 +0000 Subject: [PATCH] move tests outside package to force use of installed version --- .github/workflows/run-tests.yml | 1 + .gitignore | 2 ++ install.sh | 1 + {few/tests => tests}/__init__.py | 0 {few/tests => tests}/test_aak.py | 0 {few/tests => tests}/test_detector_wave.py | 0 {few/tests => tests}/test_fd.py | 0 {few/tests => tests}/test_few.py | 0 {few/tests => tests}/test_kerr.py | 0 {few/tests => tests}/test_mode_selector.py | 0 {few/tests => tests}/test_traj.py | 0 11 files changed, 4 insertions(+) rename {few/tests => tests}/__init__.py (100%) rename {few/tests => tests}/test_aak.py (100%) rename {few/tests => tests}/test_detector_wave.py (100%) rename {few/tests => tests}/test_fd.py (100%) rename {few/tests => tests}/test_few.py (100%) rename {few/tests => tests}/test_kerr.py (100%) rename {few/tests => tests}/test_mode_selector.py (100%) rename {few/tests => tests}/test_traj.py (100%) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index fdd5c9e8..ad5dc90e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -56,4 +56,5 @@ jobs: - name: Run module tests run: | + cd tests/ python -m unittest discover diff --git a/.gitignore b/.gitignore index 8d7b2e46..7507c14e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ few/amplitude/__pycache__/* few/files/* few/summation/__pycache__/* few/tests/__pycache__/ +tests/__pycache__/ +few/cutils/__pycache__/* few/trajectory/__pycache__/* few/trajectory/ode/__pycache__/* few/utils/__pycache__/* diff --git a/install.sh b/install.sh index 47e68d61..4d8091a5 100644 --- a/install.sh +++ b/install.sh @@ -154,5 +154,6 @@ fi if [[ "$run_tests" == "true" ]]; then echo "Running tests..."; + cd tests "$python_here" -m unittest discover; fi \ No newline at end of file diff --git a/few/tests/__init__.py b/tests/__init__.py similarity index 100% rename from few/tests/__init__.py rename to tests/__init__.py diff --git a/few/tests/test_aak.py b/tests/test_aak.py similarity index 100% rename from few/tests/test_aak.py rename to tests/test_aak.py diff --git a/few/tests/test_detector_wave.py b/tests/test_detector_wave.py similarity index 100% rename from few/tests/test_detector_wave.py rename to tests/test_detector_wave.py diff --git a/few/tests/test_fd.py b/tests/test_fd.py similarity index 100% rename from few/tests/test_fd.py rename to tests/test_fd.py diff --git a/few/tests/test_few.py b/tests/test_few.py similarity index 100% rename from few/tests/test_few.py rename to tests/test_few.py diff --git a/few/tests/test_kerr.py b/tests/test_kerr.py similarity index 100% rename from few/tests/test_kerr.py rename to tests/test_kerr.py diff --git a/few/tests/test_mode_selector.py b/tests/test_mode_selector.py similarity index 100% rename from few/tests/test_mode_selector.py rename to tests/test_mode_selector.py diff --git a/few/tests/test_traj.py b/tests/test_traj.py similarity index 100% rename from few/tests/test_traj.py rename to tests/test_traj.py