Skip to content

Commit

Permalink
Moved cython tests to own folder (#349)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Tim Süll and I3ackRacer authored Mar 12, 2024
1 parent eda61ba commit bc9e885
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ h3c/
h3/out/

# Generated C code from Cython test
tests/*.c
tests/**/*.c
# Cython HTML annotations
*.html

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Empty file added tests/test_cython/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.

0 comments on commit bc9e885

Please sign in to comment.