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

reorganize randomly across more things #209

Open
graingert opened this issue Nov 6, 2019 · 3 comments
Open

reorganize randomly across more things #209

graingert opened this issue Nov 6, 2019 · 3 comments

Comments

@graingert
Copy link
Member

would it be possible to get pytest-randomly to shuffle based on overlapping fixture scopes rather than just module, class, fn

@adamchainz
Copy link
Member

Would be cool. I wonder whether we should support different "shuffle modes".

@jacobian91
Copy link

I also would like to see this, there is a pytest plug-in that does this (pytest-random-order) but I would prefer to keep using randomly. I do like the different modes, and the 'global' version is especially interesting to me right now since I've seen in some recent tests my mocked objects 'living longer' than their test and affecting other tests in separate files entirely. I rewrote those tests to no longer have issues, but the only way I was able to detect it was to run it multiple times and a certain order of test files would cause the issue.

@adamchainz
Copy link
Member

pytest-random-order is made by friend @jbasko :)

I rewrote those tests to no longer have issues, but the only way I was able to detect it was to run it multiple times and a certain order of test files would cause the issue.

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants