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

Comments

Projects
None yet
3 participants
@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 this to the 3.0 milestone Jun 14, 2016

@RonnyPfannschmidt

This comment has been minimized.

Copy link
Member

RonnyPfannschmidt commented Jun 14, 2016

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
You can’t perform that action at this time.