Hello, I am doing some investigation into the possibility of implementing a 'folding' capability for Pytest's console output, and wanted to ask here about the feasibility of this idea. My main motivator is the fact that, in the face of multiple test failures, and with the default console behavior in place, the output can span many pages, requiring the tester to scroll back and hunt for the first failed test in the run. It is easy to get lost, and hard to pinpoint precisely where things started to go wrong. So I thought it would be helpful to have a capability that implements some sort of console 'folding', such that all the detailed Pytest console content is still available, just hidden by default - yet still able to be expanded in some way with operator interaction. [I don't know yet if "operator interaction" would be done with keyboard, mouse, or what.] I do know that Pytest already allows changing the level of verbosity, traceback info, etc. I am also aware of the pytest-html plugin, which is pretty much exactly what I am looking for, just in-console. Would appreciate some comments/advice...is this even do-able? I can't be the first person to dream of such a thing! Thanks, Jeff
Hi Jeff, That seems really useful, however it would require pytest's output to become interactive, which would be a separate application I believe. This certainly seems possible to implement as a plugin, perhaps using Rich? Anyway that is a neat idea. Cheers, Bruno. On Thu, Jul 1, 2021 at 6:20 AM Jeff Wright <jeff.washcloth@gmail.com> wrote:
Hello,
I am doing some investigation into the possibility of implementing a 'folding' capability for Pytest's console output, and wanted to ask here about the feasibility of this idea. My main motivator is the fact that, in the face of multiple test failures, and with the default console behavior in place, the output can span many pages, requiring the tester to scroll back and hunt for the first failed test in the run. It is easy to get lost, and hard to pinpoint precisely where things started to go wrong.
So I thought it would be helpful to have a capability that implements some sort of console 'folding', such that all the detailed Pytest console content is still available, just hidden by default - yet still able to be expanded in some way with operator interaction. [I don't know yet if "operator interaction" would be done with keyboard, mouse, or what.] I do know that Pytest already allows changing the level of verbosity, traceback info, etc. I am also aware of the pytest-html plugin, which is pretty much exactly what I am looking for, just in-console.
Would appreciate some comments/advice...is this even do-able? I can't be the first person to dream of such a thing!
Thanks, Jeff _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
Thanks for the feedback, Bruno. Just an FYI for anyone following this thread in the mail list - I also posed the same question on the Github discussions list: https://github.com/pytest-dev/pytest/discussions/8843. Was not sure if this mail list was even used anymore! Regards, Jeff On Thu, Jul 1, 2021 at 6:34 AM Bruno Oliveira <nicoddemus@gmail.com> wrote:
Hi Jeff,
That seems really useful, however it would require pytest's output to become interactive, which would be a separate application I believe. This certainly seems possible to implement as a plugin, perhaps using Rich? Anyway that is a neat idea.
Cheers, Bruno.
On Thu, Jul 1, 2021 at 6:20 AM Jeff Wright <jeff.washcloth@gmail.com> wrote:
Hello,
I am doing some investigation into the possibility of implementing a 'folding' capability for Pytest's console output, and wanted to ask here about the feasibility of this idea. My main motivator is the fact that, in the face of multiple test failures, and with the default console behavior in place, the output can span many pages, requiring the tester to scroll back and hunt for the first failed test in the run. It is easy to get lost, and hard to pinpoint precisely where things started to go wrong.
So I thought it would be helpful to have a capability that implements some sort of console 'folding', such that all the detailed Pytest console content is still available, just hidden by default - yet still able to be expanded in some way with operator interaction. [I don't know yet if "operator interaction" would be done with keyboard, mouse, or what.] I do know that Pytest already allows changing the level of verbosity, traceback info, etc. I am also aware of the pytest-html plugin, which is pretty much exactly what I am looking for, just in-console.
Would appreciate some comments/advice...is this even do-able? I can't be the first person to dream of such a thing!
Thanks, Jeff _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
participants (2)
-
Bruno Oliveira -
Jeff Wright