Closed
Description
- a detailed description of the bug or problem you are having
- output of
pip list
from the virtual environment you are using- NB: Before and after failing CI runs: https://www.diffchecker.com/SReU8wCR/
- pytest and operating system versions
- 8.3.1, multiple different GitHub Actions runners (
windows-2019
,ubuntu-2022
, etc.)
- 8.3.1, multiple different GitHub Actions runners (
- minimal example if possible
We have the following setup.cfg
file:
[tool:pytest]
addopts = --verbose --show-capture=stderr --tb=native
python_files = testing/**/test_*.py
# NB: norecursedirs is *not* set
When running pytest
(with no additional options) in the root of our repository, we see the following behavior:
pytest==8.2.2
: Only our tests are collected.pytest==8.3.1
: Our tests and the tests of our dependencies are collected, leading to many errors.collecting ... collected 367457 items / 408 errors / 100 skipped
(Woof!)
Changing our setup.cfg
to the following didn't fix the problem either:
[tool:pytest]
addopts = --verbose --show-capture=stderr --tb=native
testpaths = testing
python_files = test_*.py
The fix I used was adding norecursedirs = {name_of_venv}
Since this involves collection in virtual environments, the reason for the regression might be related to changes in:
Notably, we use a conda
env with pip
packages installed inside, which may subvert the expectations of the changes in the above PR.
Metadata
Metadata
Assignees
Labels
No labels