None of the `cython_*` APIs have any tests using Cython
See original GitHub issueThere are Python-level tests, e.g. scipy/linalg/tests/test_cython_blas.py
. However, no tests failed when some .pxd
files went missing in the Meson build. We need some basic tests that cimport
some functionality and invoke Cython in a subprocess. Submodules that need testing:
-
linalg.cython_blas
-
linalg.cython_lapack
-
optimize.cython_optimize
-
special.cython_special
Test infrastructure can be stolen from https://github.com/numpy/numpy/blob/main/numpy/random/tests/test_extending.py
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Using C libraries — Cython 3.0.0a11 documentation
The following gives a complete example for using (and wrapping) an external C library in Cython code, including appropriate error handling and considerations ......
Read more >py.test to test Cython C API modules - Stack Overflow
I'm trying to set up unit tests for a Cython module to test some functions that do not have python interface. The first...
Read more >Change to non-deprecated NumPy C API · Issue #2498 - GitHub
Currently Cython uses a NumPy API that has been deprecated since NumPy ... this out into a full PR with error checking and...
Read more >Cython: C-Extensions for Python
We regularly run integration tests against all supported CPython versions and their latest in-development branches to make sure that the generated code stays ......
Read more >request for a @cython.nochecks(True) compilation option
This is the code in question - note I have @cython.boundscheck(False) set for ... Cython allows you to pass None instead of any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok great, I’ll get to it over the Christmas break
I’d say yes, that is enough for now, one or two functions per cython module. The tests I linked in the PR description builds an extension with cython (https://github.com/numpy/numpy/tree/main/numpy/random/_examples/cython), and then not only imports it but uses the API. If that works for one function in a module, it’s quite likely that it works for all of them. So while complete coverage would be nice, that’s a large task that’s best left until we see a need.