-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
The pytest is unable to find any tests in the sdist downloaded from PyPI:
$ wget https://files.pythonhosted.org/packages/source/i/invocations/invocations-4.0.2.tar.gz
$ gtar xf invocations-4.0.2.tar.gz
$ cd invocations-4.0.2
$ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest --setup-plan
================================================= test session starts ==================================================
platform sunos5 -- Python 3.9.23, pytest-8.3.3, pluggy-1.6.0
rootdir: /tmp/invocations/invocations-4.0.2
configfile: pyproject.toml
collected 0 items
================================================ no tests ran in 0.05s =================================================
$
This partially helps, but there is still some issue:
$ wget https://raw.githubusercontent.com/pyinvoke/invocations/refs/heads/main/pytest.ini
$ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest --setup-plan
================================================= test session starts ==================================================
platform sunos5 -- Python 3.9.23, pytest-8.3.3, pluggy-1.6.0
rootdir: /tmp/invocations/invocations-4.0.2
configfile: pytest.ini
testpaths: tests
collected 0 items / 1 error
======================================================== ERRORS ========================================================
__________________________________ ERROR collecting tests/packaging/_support/conf.py ___________________________________
import file mismatch:
imported module 'conf' has this __file__ attribute:
/tmp/invocations/invocations-4.0.2/tests/autodoc/_support/conf.py
which is not the same as the test file we want to collect:
/tmp/invocations/invocations-4.0.2/tests/packaging/_support/conf.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
=============================================== short test summary info ================================================
ERROR tests/packaging/_support/conf.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 1 error in 4.04s ===================================================
$
Metadata
Metadata
Assignees
Labels
No labels