scipy / scipy_doctest

Floating-point aware doctesting
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

plugin misses compiled modules which are not included in any `__init__.py` listing #106

Open ev-br opened 6 months ago

ev-br commented 6 months ago

Case in point: scipy.fftpack.convolve namespace. It comes from a standalone Cython source, https://github.com/scipy/scipy/blob/main/scipy/fftpack/meson.build#L1, and its contents is not included into scipy.fftpack namespace, https://github.com/scipy/scipy/blob/main/scipy/fftpack/__init__.py

ev-br commented 6 months ago

The fix is probably to implement pytest_collect_file: the vanilla doctest version only looks into *py files: https://github.com/pytest-dev/pytest/blob/8.0.x/src/_pytest/doctest.py#L127

cross-ref https://github.com/ev-br/scpdt/issues/99#issuecomment-1724229972 for links to upstream pytest discussions.