Skip to content

pytest collects and runs tests that name starts with tests_ #4818

@sliwinski-milosz

Description

@sliwinski-milosz

If that is expected behaviour then test discovery documentation needs to be updated as it doesn't say anything about that feature.

test.py

def tests_something():
    assert True

Above tests_something function got collected by pytest and it ran it.

Tested on pytest==4.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions