rascaline
rascaline copied to clipboard
Check if python declarations are up to date before running python tests
If the ctypes declarations in Python do not agree with the functions actually exported by the C API, strange and confusing errors might start to appear. In the best case, this result in a segfault when the code tries to access parameters, which produce error message like ERROR: InvocationError for command discover -p '*.py' -s python/tests (exited with code -11 (SIGSEGV)) (exited with code -11)
.
A simple fix would be to add a --check
option to generate-declarations.py
, which do not touch the file on disk, but check that the output is the one expected. Ideally, this check failing would stop all python tests, to remove other errors until this one is fixed.