You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Figure out why doctests in c-implemented functions (ufuncs in scipy.special, LinearNDInterpolator etc) are not collected by vanilla pytest doctest collection. Maybe it's something to fix on the pytest side?
We'll then be able to remove quite a few workarounds.
The text was updated successfully, but these errors were encountered:
For us, it needs a bit of testing because simply using inspect.isroutine is not enough:
In [42]: from scipy import special as s
In [43]: import numpy as np
In [57]: for obj in [s.erf, np.add, LinearNDInterpolator, LinearNDInterpolator.__call__]:
...: print(obj, inspect.isfunction(obj), inspect.isroutine(obj), inspect.isbuilt
...: in(obj), inspect.isclass(obj), isinstance(obj, np.ufunc))
...:
<ufunc 'erf'> False False False False True
<ufunc 'add'> False False False False True
<class 'scipy.interpolate.interpnd.LinearNDInterpolator'> False False False True False
<cyfunction NDInterpolatorBase.__call__ at 0x7fa04ee17440> False True False False False
we'll need to check if an object is a routine or a class of a ufunc. Will need testing and checking the log.
EDIT: In fact, there are two separate issues here. One is indeed pytest-dev/pytest#11388; the more immediate is that the .so files are not collected via pytest_collect_file. More details are at pytest-dev/pytest#11450.
Figure out why doctests in c-implemented functions (ufuncs in scipy.special,
LinearNDInterpolator
etc) are not collected by vanilla pytest doctest collection. Maybe it's something to fix on the pytest side?We'll then be able to remove quite a few workarounds.
The text was updated successfully, but these errors were encountered: