You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposed new feature or change: Unit testing C code
One of the primary motivations behind this change is to support F2PY generated codes better. Working with fortranobject.{c,h} while trying to have test coverage is effectively impossible right now. Currently we only have integration tests (at the Python level) and this makes it hard to track problems sometimes.
However, beyond F2PY as well, unit testing the NumPy-C API can be done in low-boilerplate way with cmocka.
Some nice features of cmocka:
C only
Surprisingly low boilerplate
Is easily available on conda
Used by a bunch of other projects (e.g. libssh)
Existing C-testing:
Integration (pytest)
Making small extension modules to test parts of the public API (test_mem_policy.py)
Some questions which have come up in discussions are:
Compiling on Windows is slow --> we can concatenate these on the CI
Compiling them in monolithic files might be hard to debug (e.g. F2PY generates wrong C code)
This should not be an issue for the most part, compiler errors are caught by our test suite now as well, which should not change.
The text was updated successfully, but these errors were encountered:
Proposed new feature or change: Unit testing C code
One of the primary motivations behind this change is to support F2PY generated codes better. Working with
fortranobject.{c,h}
while trying to have test coverage is effectively impossible right now. Currently we only have integration tests (at the Python level) and this makes it hard to track problems sometimes.However, beyond F2PY as well, unit testing the NumPy-C API can be done in low-boilerplate way with cmocka.
Some nice features of
cmocka
:conda
libssh
)Existing C-testing:
pytest
)Some questions which have come up in discussions are:
The text was updated successfully, but these errors were encountered: