-
Notifications
You must be signed in to change notification settings - Fork 231
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
Ability to specify granularity of the tests to be distributed #7
Comments
Hi @Ludachrispeed, thanks for the report. This is a long requested feature, being duplicated by pytest-dev/pytest#175 and pytest-dev/pytest#738. I'm closing this as a duplicate then. |
@nicoddemus I've tried to follow this feature request among the multiple issues - and they are seemingly all closed. I want to do something similar. The expensive calculation is all within the setup of a test class and the setup is parameterized. So is there a way to do this - even a hacky one? |
@wkerzendorf currently the xdist internals are not in a shape that makes this easy collection runs only on the workers, sheduling happens only on the controller, however only the only communicated metadata are test ids# not even fixtures and their scopes/ids |
@RonnyPfannschmidt any other suggestion you have (even outside xdist)? One of our tests likely takes days. Is there a way to tell it not to split up the class, etc? thanks |
@wkerzendorf just have a cli option to run exactly that thest and simply dont run it in a normal test run if you have singluar end2end tests that take days - run them separate - in general - a general parallel test-runner is not thinking in terms of massive tests vs normal tests |
@RonnyPfannschmidt we do this. So we have a parametrized setup of these long running tests (let's say A, B, C, D). Can I just say - run one parameter set of a parametrized test? |
I think @RonnyPfannschmidt means something like this:
It should be simple to change your CI system to run pytest twice instead of only once. You can have even more layers of test sessions if you prefer. |
Btw there's a pytest channel at freenode where people answer questions. |
@nicoddemus - we already do this. |
But are there as helpful people as you and @RonnyPfannschmidt on this freenode channel ;-) I'll go there and give it a try. |
(btw I'm perfectly fine in using the issue tracker for this type of conversation. you can easily share code and the solution can be found by others later) So that I understand, do you have one test which is parametrized, but is only slow for some of those parameters? |
As discussed in this post: http://stackoverflow.com/questions/4637036/is-there-a-way-to-control-how-pytest-xdist-runs-tests-in-parallel
When using
distmode = 'load'
, it would nice ifxdist
provided a mechanism to allow users to specify an alternate test collection algorithm. As the StackOverflow post mentions, splitting up by TestSuite or module would be very useful.The text was updated successfully, but these errors were encountered: