Skip to content
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

Drop duplicated tests by default #1609

Closed
nicoddemus opened this issue Jun 14, 2016 · 1 comment
Closed

Drop duplicated tests by default #1609

nicoddemus opened this issue Jun 14, 2016 · 1 comment
Labels
topic: collection related to the collection phase
Milestone

Comments

@nicoddemus
Copy link
Member

nicoddemus commented Jun 14, 2016

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.

@nicoddemus nicoddemus added the topic: collection related to the collection phase label Jun 14, 2016
@nicoddemus nicoddemus added this to the 3.0 milestone Jun 14, 2016
@RonnyPfannschmidt
Copy link
Member

i#d be happy to see this removed as well,
note that this will break a number of plugins doing alternative collection due to duplicate node-ids
it would also allow us to turn back on the pytest-xdist implementation detail that uses collection index instead of nodeid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: collection related to the collection phase
Projects
None yet
Development

No branches or pull requests

3 participants