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
Warnings not captured during test collection #3251
The warnings docs clearly state that it captures warnings during test execution, but that means any warnings issued during test collection will not be captured and will silently pass. Consider this slight tweak to the canonical example:
Would it be possible for the warnings feature to also be enabled during test collection, such that warnings like these could also be captured and reported and tweaked by the pytest config?
Hi @jaraco, thanks for writing down this issue, this was a known limitation that was supposed to be registered in an issue already but it seems it got forgotten.
It should be perfectly possible to capture and display warnings during collection, so hopefully this is something that will be tackled in the internal warnings refactoring for 3.5.