I am getting deprecation warnings from nosetest for 3rd party modules imported by my code.
Does anybody know how to silence these warnings?
I know of the following flag which works for arbitrary python runs of the same code:
python -W ignore::DeprecationWarning
But, calling nosetest does not appear to offer me a similar flag to prevent the warnings from appearing within the test reports.
Put
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
at the start of your test script, before you import any problematic libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With