-
Notifications
You must be signed in to change notification settings - Fork 235
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
Logs before rerun appear in html report #787
Comments
What's the expectation here? 🤔 Shouldn't the final result have all logs? Including those of reruns? Maybe it looks like it doesn't on a trivial example, but in the real world the logs might contain crucial information to solve flaky logic. |
From my point of view, only the logs of the last (re)run matter. |
Ok, maybe that makes sense if the logs for previous runs are available in those runs in the report. Can you clarify what you mean when you say that "_process_logs" isn't called? |
I didn't say it isn't called, maybe it's called earlier, or maybe not in the right context, or maybe I misunderstood its purpose :) |
heh, ok. I'll explore the behaviour in 3.x and compare. |
I would think the exact opposite, myself. Why don't you care seeing logs from previous failures that force a rerun? Those test cases are the most flaky, and therefore of the most interest. |
Right, but if it failed 3 times, and each run produces many logs, having the logs duplicated is cumbersome. I assume that if all runs failed, then the last run shouldn't be much different than the previous ones. |
We're running a plugin called |
pytest --reruns 1 --html=report.html
The report has logs of both runs:
It looks like there is logic in
_process_logs
to skip rerun logs, but this function is not called (maybe it was changed in pytest).The text was updated successfully, but these errors were encountered: