-
Notifications
You must be signed in to change notification settings - Fork 234
Displaying file names when run parallel #450
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
Comments
Hi @bsipocz, If you pass |
the current terminal ux is not sanely able to show more than one file in progress at the same time |
Yes, |
Yeah the xdist reporter would need to be able to jump back and forth, the regular report is missing useful information and the -v is hard to read (as it shows test ids both to say that it's started and to provide the status). That would probably have to be an additional plugin though, the runner can't really assume it has a proper term with all the flexibility of a TUI I think? |
I'm a bit confused:
It seems like pytest-xdist is overriding the report output, but since it seems to work with pytest-pretty I'm not sure why. Is pytest-pretty giving incorrect output, or is pytest-xdist changing the report output when that isn't necessary? |
Ah, I think I understand -- it looks like
I can imagine why pytest-xdist changed the report output, but can the pytest-xdist report changes be disabled? I'd like to use the default pytest report output, but I'm unsure how. |
xdist would have to jump back and forth vertically e.g. update the progress of test_foo after it's already written the line for test_bar. For the normal mode this is not an issue because it runs every file linearly so test_bar is only written out once test_foo has been completed, so everything is just written left to right and top to bottom. Per @RonnyPfannschmidt's comment the internal reporting API does not currently have the ability to perform such effects (which also requires the ability to detect the capabilities or lack thereof of the terminal), and would likely need significant updates before it's a possibility. Were xdist's changes to the reporting system disabled it would just throw unreadable garbage at the screen e.g.
or something even worse. I would assume a similar issue occurs when using one of the randomising plugins and randomising across files, and their solution is similar. |
It's probably reasonably easy to do this with rich tables these days, however nobody has stepped up to do it There are multiple rich based plugins for ux that can experiment with this |
Do you have any suggestions on how I might test this? |
Nope, execnet and xdist interleave in ways where I have to read Int the code myself to figure how to turn things off In purely practical terms it means N+1 pytest processes writing to stdout with no coordination |
Currently when tests are run on multiple cores the name of the files are not displayed any more. It would be rather useful to be able to still receive the same information even if it means one need to wait until all the end of the test run.
Without using numprocesses:
With
numprocesses
:Also, having the info of the total number of collected and skipped tests is useful, too, and it's not printed in the latter case either.
The text was updated successfully, but these errors were encountered: