[Python-Dev] DeprecationWarnings in the regression tests

Guido van Rossum guido@python.org
Mon, 15 Apr 2002 17:21:27 -0400

> I wonder if we shouldn't just add
>     warnings.filterwarnings('ignore', '', DeprecationWarning)
> at the top of regrtest.py?  Seems like with the proliferation of
> deprecations, I'm finding I want to add something like this (with the
> module parameter added to each file that tests a newly deprecated
> feature.  If this is going to be SOP for the test suite, we might as
> well kill them all with one fell swoop.

No, because a test might use some feature that is deprecated, not as
the feature to be tested, but as a tool for the testing.  (E.g. a test
function might use "from M import *".)

With your approach we would never hear about this deprecation until
the feature is finally removed.

--Guido van Rossum (home page: http://www.python.org/~guido/)