pytest-dev / pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
12.02k stars 2.67k forks source link

(Optionally) display tracebacks with warnings #3559

Open blueyed opened 6 years ago

blueyed commented 6 years ago

As per https://github.com/carltongibson/django-filter/pull/903#issuecomment-394865805 it might be useful to display tracebacks with warnings.

Since this makes the warnings section very verbose, this should become a separate option probably, or could be controlled through --verbose maybe.

pytestbot commented 6 years ago

GitMate.io thinks possibly related issues are https://github.com/pytest-dev/pytest/issues/1996 (Warnings handling), https://github.com/pytest-dev/pytest/issues/132 (Pygmentize native tracebacks), https://github.com/pytest-dev/pytest/issues/2684 (review warning stacklevels), https://github.com/pytest-dev/pytest/issues/1370 (Print out pytest-warnings?), and https://github.com/pytest-dev/pytest/issues/2332 (What is multicall warning?).

blueyed commented 6 years ago

Would also be nice to automatically call pdb on warnings.

-W error --pdb works, but only for the first warning.

Maybe something like -W pdb could be added, which would behave similar to -W error --pdb, but continue afterwards instead of stopping.

sweenu commented 4 years ago

Will this not be implemented after all?