alimanfoo / anjl

A neighbour-joining library for Python.
https://alimanfoo.github.io/anjl
MIT License
0 stars 0 forks source link

Consider always running tests with bounds check enabled #37

Closed alimanfoo closed 1 week ago

alimanfoo commented 1 week ago

Recently I introduced an out of bounds indexing bug, but didn't notice immediately because most of the time the code still ran fine. Temporarily setting bounds checking to True for the numba jitted functions then revealed immediately I had an out of bounds error. Perhaps it would be a good idea to set bounds check based on whether we are running tests or not. Pytest has an environment variable that would enable this... https://docs.pytest.org/en/stable/example/simple.html#detect-if-running-from-within-a-pytest-run