[issue11959] smtpd cannot be used without affecting global state

Antoine Pitrou report at bugs.python.org
Tue May 15 21:29:06 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

> I initially came across this because I got some warnings from
> regrtest.py about changed state, when I was trying to implement a
> TestSMTPServer class (derived from smtpd.SMTPServer) to test the
> SMTPHandler in logging.

If you get a warning, it means your tests lack proper cleanup, so you should fix that instead of trying to make the warning disappear by circumventing regrtest's detection mechanism.

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11959>
_______________________________________


More information about the Python-bugs-list mailing list