[Python-Dev] Problems with regrtest and with logging

Éric Araujo eric at netwok.org
Fri May 13 20:02:05 CEST 2011


On Sat, May 7, 2011 at 3:51 AM, Éric Araujo <merwok at netwok.org> wrote:
> regrtest helpfully reports when a test leaves the environment unclean
> (sys.path, os.environ, logging._handlerList)

A quick follow-up: I talked about regrtest with RDM on IRC, and I will
use the context manager that detects changes in the “if __name__ ==
'__main__'” blocks of our test files to find the guilty ones.  Some
warnings are subtle to track down: the test runs a command which
instantiates a class which calls a function and here’s the code that
sets an environment variable.

In the future, I’ll take part in the efforts to reimplement parts of
regrtest with new unittest features.  Right now it’s quite painful to
have to use either unittest to run just one file or regrtest to get the
warnings.

Cheers


More information about the Python-Dev mailing list