Without it, it seems that the Ode test fails with a linking error:
106/111 Test #106: Ode .................................................................................................***Failed 0.67 sec
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-8.1.0, pluggy-1.4.0
rootdir: /home/runner/work/nmodl/nmodl
configfile: pyproject.toml
plugins: anyio-4.3.0, cov-4.1.0
collected 0 items / 1 error
==================================== ERRORS ====================================
__________________ ERROR collecting test/unit/ode/test_ode.py __________________
ImportError while importing test module '/home/runner/work/nmodl/nmodl/test/unit/ode/test_ode.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
../../../test/unit/ode/test_ode.py:6: in <module>
from nmodl.ode import differentiate2c, integrate2c
../../lib/nmodl/__init__.py:34: in <module>
from ._nmodl import NmodlDriver, to_json, to_nmodl, __version__ # noqa
E ImportError: libclang_rt.ubsan_standalone-x86_64.so: cannot open shared object file: No such file or directory
=========================== short test summary info ============================
ERROR ../../../test/unit/ode/test_ode.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.14s ===============================
This try ... except block has caused me to take longer to notice that the installation of NMODL was broken. We should have helper in coding-conventions to make sanitizers and tests work together.
Currently the
__init__.py
of the Python bindings contains the following peculiartry..except
block:https://github.com/BlueBrain/nmodl/blob/f930357ae20b84f95f8fd327b10cae61e332effd/nmodl/__init__.py#L34-L41
Without it, it seems that the
Ode
test fails with a linking error: