-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytest __init__.py collects another file in the directory #8976
Labels
topic: collection
related to the collection phase
Comments
Still happening in
|
bluetech
added a commit
to bluetech/pytest
that referenced
this issue
May 27, 2023
….py` Module Previously it would collect the entire package, but this is not what users expect. Refs pytest-dev#3749 Fixes pytest-dev#8976 Fixes pytest-dev#9263 Fixes pytest-dev#9313
bluetech
added a commit
to bluetech/pytest
that referenced
this issue
Jun 3, 2023
….py` Module Previously it would collect the entire package, but this is not what users expect. Refs pytest-dev#3749 Fixes pytest-dev#8976 Fixes pytest-dev#9263 Fixes pytest-dev#9313
bluetech
added a commit
to bluetech/pytest
that referenced
this issue
Jun 3, 2023
….py` Module Previously it would collect the entire package, but this is not what users expect. Refs pytest-dev#3749 Fixes pytest-dev#8976 Fixes pytest-dev#9263 Fixes pytest-dev#9313
bluetech
added a commit
to bluetech/pytest
that referenced
this issue
Jun 23, 2023
….py` Module Previously it would collect the entire package, but this is not what users expect. Refs pytest-dev#3749 Fixes pytest-dev#8976 Fixes pytest-dev#9263 Fixes pytest-dev#9313
bluetech
added a commit
to bluetech/pytest
that referenced
this issue
Jun 23, 2023
….py` Module Previously it would collect the entire package, but this is not what users expect. Refs pytest-dev#3749 Fixes pytest-dev#8976 Fixes pytest-dev#9263 Fixes pytest-dev#9313
Excellent -- thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I run
pytest __init__.py
by mistake, but it unexpectedly succeeded.pytest __init__.py
seems collecting the tests in the first file in the directory instead. It's neither equivalent withpytest .
nor "collected 0 items".environment
pytest 6.2.4
python -c 'import sys; print(sys.version)'
pip list
minimal example
with the following files.
foo_tests/__init__.py
: empty filefoo_tests/test_a.py
foo_tests/test_b.py
The text was updated successfully, but these errors were encountered: