Skip to content

pytest-doctestplus fails with editable install #7784

@lagru

Description

@lagru

I've been a bit annoyed for some time now that I can't test doctests locally because I'm using an editable install. And since that is also the workflow we recommend in our docs I tried to address it.

Installing skimage in editable mode

spin install --editable

will create some differences between which doctests are expected to exist and which are available at runtime. E.g. consider brief_pythran.py. That one will be found in the source by

spin test -- --doctest-plus skimage

but there will be no corresponding module brief_pythran at runtime because that get's transpiled to

output: ['brief_cy.cpp'],

There are currently 8 such cases:

Details
ERROR skimage/_build_utils/__init__.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/_build_utils/copyfiles.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/_build_utils/cythoner.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/_build_utils/gcc_build_bitness.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/_build_utils/tempita.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/_build_utils/version.py - ModuleNotFoundError: No module named 'skimage._build_utils'
ERROR skimage/feature/_hessian_det_appx_pythran.py - ModuleNotFoundError: No module named 'skimage.feature._hessian_det_appx_pythran'
ERROR skimage/feature/brief_pythran.py - ModuleNotFoundError: No module named 'skimage.feature.brief_pythran'

For a start I tried ignoring these tests. __doctest_skip__, and different pytest hooks in our conftest.py all didn't work so far.

I'm not yet sure how to proceed. But at least I can document my troubles. 😅

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions