From bc9e8857a97336168c3aebcaee179354d0cda275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20S=C3=BCll?= Date: Tue, 12 Mar 2024 03:26:56 +0100 Subject: [PATCH] Moved cython tests to own folder (#349) * fix: moved cython_example.pyx and test_cython.py tests to their own folder * updated test.yml and makefile * fix: updated coverage-lint.yml to match new path * fix: all *.c files in tests/ folder and subfolders of tests/ will now be ignored --------- Co-authored-by: Tim S --- .github/workflows/coverage-lint.yml | 2 +- .github/workflows/tests.yml | 2 +- .gitignore | 2 +- makefile | 2 +- tests/test_cython/__init__.py | 0 tests/{ => test_cython}/cython_example.pyx | 0 tests/{ => test_cython}/test_cython.py | 0 7 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 tests/test_cython/__init__.py rename tests/{ => test_cython}/cython_example.pyx (100%) rename tests/{ => test_cython}/test_cython.py (100%) diff --git a/.github/workflows/coverage-lint.yml b/.github/workflows/coverage-lint.yml index a4232771..7f3c1814 100644 --- a/.github/workflows/coverage-lint.yml +++ b/.github/workflows/coverage-lint.yml @@ -36,7 +36,7 @@ jobs: - name: Coverage run: | pip install Cython - cythonize -i tests/cython_example.pyx + cythonize -i tests/test_cython/cython_example.pyx pytest --cov=h3 --full-trace --cov-report=xml - name: Upload coverage to Codecov diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d4b58fc..45f007fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,5 +44,5 @@ jobs: - name: Tests run: | pip install Cython - cythonize -i tests/cython_example.pyx + cythonize -i tests/test_cython/cython_example.pyx pytest tests --cov=h3 --full-trace diff --git a/.gitignore b/.gitignore index 5bd718fc..8b6903ba 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ h3c/ h3/out/ # Generated C code from Cython test -tests/*.c +tests/**/*.c # Cython HTML annotations *.html diff --git a/makefile b/makefile index 31b47cb5..56b97d96 100644 --- a/makefile +++ b/makefile @@ -39,7 +39,7 @@ annotations: rebuild cp _skbuild/*/cmake-build/src/h3/_cy/*.html ./annotations test: - ./env/bin/cythonize -i tests/cython_example.pyx + ./env/bin/cythonize -i tests/test_cython/cython_example.pyx ./env/bin/pytest tests --cov=h3 --cov-report term-missing --durations=10 lint: diff --git a/tests/test_cython/__init__.py b/tests/test_cython/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/cython_example.pyx b/tests/test_cython/cython_example.pyx similarity index 100% rename from tests/cython_example.pyx rename to tests/test_cython/cython_example.pyx diff --git a/tests/test_cython.py b/tests/test_cython/test_cython.py similarity index 100% rename from tests/test_cython.py rename to tests/test_cython/test_cython.py