<div dir="ltr">Hi Stefan,<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 19, 2018 at 7:25 AM Stefan Scherfke <<a href="mailto:stefan@sofa-rockers.org">stefan@sofa-rockers.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Then about about these incremental changes?<br>
<br>
1. It should not be to hard to change the order in which a test’s name,<br>
the test’s output and the test result are printed?<br>
<br>
The current default is not too readable:<br>
<br>
tests/test_stuff.py::test_xy has this test PASSED OR FAILED PASSED<br>
<br>
In the example above, its quite hard to see that "has this test<br>
PASSED OR FAILED" is the tests output and not pytest-output.<br>
<br>
We could copy pytest-sugar's formatting to make it more readable:<br>
<br>
has this test PASSED OR FAILED<br>
tests/test_suff.py::test_xy PASSED<br></blockquote><div><br></div><div>What do you mean by "the test’s output"? You probably don't mean things like print() and such as those are captured and shown at the end of the run.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Since pytest already can color its output, we could color <br>
the test dir and test file (in non-verbose mode) or test-path and<br>
test-func (in verbose mode) in different collors.<br></blockquote><div><br></div><div>Sounds good!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. We could also show the progress in verbose mode.<br></blockquote><div><br></div><div>We currently show the progress (percentage or count) in verbose mode. Do you mean a progress bar?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
4. We could colorize the dots and Fs of test results in non-verbose <br>
mode (e.g., green ".", red "F", yellow "x", …)<br></blockquote><div><br></div><div>Sounds good as well.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
5. Another idea would be to allow the user to provide templates for<br>
test output (similar to what you can to with hg/git log formatting)<br></blockquote><div><br></div><div>This personally feels like a little too bloat, but if others think this is nice then OK. This would be an option specific to the terminal plugin.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
These would be relatively small changes which don’t add any new<br>
dependency or a lot of complexity to pytest but would improve the UX.<br></blockquote><div><br></div><div>Those are all plausible ideas, feel free to create issues to them in the tracker. Furthermore, some of them, specially 4, are really simple and candidates for a PR. :)</div><div><br></div><div>Cheers,</div><div>Bruno.</div></div></div>