Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Show "short test summary info" after tracebacks and warnings #3255
Currently when using
When you have a large test suite and a lot of tests fail, the short summary test info easily gets lost amidst the huge number of lines printed by all the tracebacks.
I tracked this to a change introduced in #1305 (by yours truly) which was meant to fix the warnings count, but have this unfortunate side effect.
With the change the output now becomes:
In order to avoid breakages and further surprises I thought better to create a new hook because changing the place where
added a commit
this pull request
Feb 22, 2018
Good point, I was also under that impression but thought opening a PR first to invite comments. BUT if we follow this approach I think we will re-introduce #1305 no?
The original problem was that
self.summary_errors() self.summary_failures() self.summary_warnings() # < warning count captured and shown here self.config.hook.pytest_terminal_summary(terminalreporter=self) # <- pytest-benchmark hook called at this point
@RonnyPfannschmidt suggests that
self.config.hook.pytest_terminal_summary(terminalreporter=self) def pytest_terminal_summary(): self.summary_errors() self.summary_failures() self.summary_warnings()
I'm pretty sure this will work and not introduce a regression as