[TIP] pytest-sugar -> pytest
Bruno Oliveira
nicoddemus at gmail.com
Wed Sep 19 05:17:30 PDT 2018
Hi Stefan,
On Wed, Sep 19, 2018 at 7:25 AM Stefan Scherfke <stefan at sofa-rockers.org>
wrote:
> Then about about these incremental changes?
>
> 1. It should not be to hard to change the order in which a test’s name,
> the test’s output and the test result are printed?
>
> The current default is not too readable:
>
> tests/test_stuff.py::test_xy has this test PASSED OR FAILED PASSED
>
> In the example above, its quite hard to see that "has this test
> PASSED OR FAILED" is the tests output and not pytest-output.
>
> We could copy pytest-sugar's formatting to make it more readable:
>
> has this test PASSED OR FAILED
> tests/test_suff.py::test_xy PASSED
>
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.
> 2. Since pytest already can color its output, we could color
> the test dir and test file (in non-verbose mode) or test-path and
> test-func (in verbose mode) in different collors.
>
Sounds good!
> 3. We could also show the progress in verbose mode.
>
We currently show the progress (percentage or count) in verbose mode. Do
you mean a progress bar?
> 4. We could colorize the dots and Fs of test results in non-verbose
> mode (e.g., green ".", red "F", yellow "x", …)
>
Sounds good as well.
> 5. Another idea would be to allow the user to provide templates for
> test output (similar to what you can to with hg/git log formatting)
>
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.
> These would be relatively small changes which don’t add any new
> dependency or a lot of complexity to pytest but would improve the UX.
>
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. :)
Cheers,
Bruno.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20180919/1e92d9d3/attachment.htm>
More information about the testing-in-python
mailing list