Previously it would collect the entire package, but this is not what users expect. Refs #3749 Fixes #8976 Fixes #9263 Fixes #9313
6 lines
385 B
ReStructuredText
6 lines
385 B
ReStructuredText
Running `pytest pkg/__init__.py` now collects the `pkg/__init__.py` file (module) only.
|
|
Previously, it collected the entire `pkg` package, including other test files in the directory, but excluding tests in the `__init__.py` file itself
|
|
(unless :confval:`python_files` was changed to allow `__init__.py` file).
|
|
|
|
To collect the entire package, specify just the directory: `pytest pkg`.
|