rascaline icon indicating copy to clipboard operation
rascaline copied to clipboard

Check if python declarations are up to date before running python tests

Open Luthaf opened this issue 3 years ago • 0 comments

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.

Luthaf avatar May 18 '21 12:05 Luthaf