Skip to content

Pytest 3.7.1 is not collecting __init__.py files #3773

Closed
@deeechun

Description

@deeechun

Hi! I seem to have run into a bug on the latest build. Pytest is not collecting __init__.py files, even after specifying python_files to *.py in pytest.ini. I have all of my test functions named correctly, starting with test_* as well.

Here is a quick example.

Tree:

tests/
├── __init__.py
├── sample
│   ├── __init__.py
│   └── sample_test.py

Command + output:

pytest --collect-only tests/sample/
============================= test session starts ==============================
platform linux -- Python 3.7.0, pytest-3.7.1, py-1.5.4, pluggy-0.7.1
rootdir: /home/deebs/playground/radish_steps, inifile: pytest.ini
collected 1 item                                                               
<Module 'tests/sample/sample_test.py'>
  <Function 'test_sample'>

========================= no tests ran in 0.02 seconds =========================

If you need any more details, please feel free to reach out

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions