How to efficiently get rid of warnings emitted by the tests #597
vhirtham
announced in
Guidelines
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The warning output of
pytest
is mostly not really helpful to find the source of a warning quickly. A simple trick to get a full trace is to turn the specific warning type you want to eliminate into an error. Withpytest
, just use:For example, to find the sources of all the "unit stripped" warnings emitted by
pint
, I used:You should also add these options to your
pytest
template in PyCharm so that you can run a failing test individually until the warning is gone.Beta Was this translation helpful? Give feedback.
All reactions