question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

None of the `cython_*` APIs have any tests using Cython

See original GitHub issue

There 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:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Kai-Striegacommented, Dec 19, 2022

Ok great, I’ll get to it over the Christmas break

1reaction
rgommerscommented, Dec 19, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found