Skip to content

Drop duplicated tests by default #1609

Closed
@nicoddemus

Description

@nicoddemus

py.test will happily run the same tests more than once if you provide multiple path arguments which contain the same test files:

py.test model/tests model

This will execute all tests from model/tests twice.

While there are some edge use cases where this useful (#1187), it seems in general users are confounded by this behavior more than delighted it exists (#1607).

I think we should discuss if we should drop duplicated tests by default, perhaps introducing a new --keep-duplicates if we want to preserve the old behavior.

EDIT: if we decide to keep running duplicated tests, we should at least document the behavior (see comment), possibly mentioning pytest-drop-dup-tests as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions