Nostalgia Warnings

I get obsolescence warnings from nosetest for third-party modules imported by my code.

Does anyone know how to silence these warnings?

I know the following flag, which works for arbitrary python runs of the same code:

python -W ignore::DeprecationWarning 

But calling nosetest doesn't seem to offer me a similar flag to prevent warnings from appearing in test reports.

+4
source share
1 answer

Put

 import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) 

at the beginning of your test script before importing any problematic libraries.

+3
source

All Articles