-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Show total progress in terminal during testing #2657
Comments
Note: this would work with |
doesnt pytest-sugar already implement a much nicer version of this |
Indeed, but pytest-sugar only works on Linux. 😬 |
I like it! pytest-sugar also has a lot of other problems (it being very fancy is also causing issues), and good defaults matter. |
according to Teemu/pytest-sugar#49 (comment) it only a codepage issue and solvable by a single command |
well, im fine with enhancing terminal output, but i do wonder how much harder it will make the removal of the current terminalwriter mess also note that currently the terminal width determination of pylib is completely broken for output capture situation |
Didn't know that, thanks for the link!
AFAIK it won't make things worse (it will depend on |
does anybody works on this issue? |
@nicoddemus do you have any plans/attempts already started, if thats not the case, i propose we let @ApaDoctor try |
I have a work in progress at home actually, I don't think it is pushed to me fork though. @ApaDoctor let me push that branch when I get home so you can take a look. This is a little tricky than thought at first because we have to "hook" into terminal's writer to ensure we are tracking the correct number of chars written to the current line so far. |
@ApaDoctor take a look at https://github.com/nicoddemus/pytest/tree/console-progress-2657 if you are interested. |
This is pretty cool 👍 I think if this existed 4 years ago I would have never started pytest-sugar project. |
Which would be a shame because pytest-sugar terminal is awesome 😁 |
When I added a pytest.ini file with the following contents, I started seeing progress on my xdist runs:
|
This is a proposal to change the terminal output while running tests to include the total tests ran so far and the total tests still to run, or percentage of the total tests executed so far.
Currently here's the normal pytest output (minus header):
What I propose is:
This would be a better view of the overall progress and how much tests are still left on the run.
Alternatively instead of showing test counts we could just show a percentage of the total run so far:
Thoughts? cc @RonnyPfannschmidt @hpk42 @The-Compiler @hackebrot
Side note
This idea came to be because it Jenkins (it seems) only updates its console view when the process outputs a new line. When running with xdist, pytest only prints a
.
per test, only printing a new line at the end of the session, so the output windows doesn't update until the end of the run.Changing the output to the one proposed here would fix that and also provide a nice user experience (IMO).
The text was updated successfully, but these errors were encountered: