[issue11959] smtpd cannot be used without affecting global state

Vinay Sajip report at bugs.python.org
Tue May 15 23:15:14 CEST 2012


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> 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.

What makes you say I was trying to circumvent regrtest's detection mechanism? I wasn't. Isn't it the case that tests shouldn't affect global state? Since regrtest told me that global state was being changed by the smtpd module used by the test, I tried to find a way of avoiding changing global state in my test - but because of the problem I mention, I couldn't see a way of using smtpd without affecting global state. This is partly because of an underlying wart in asyncore, which this issue is trying to address.

Do you have a proposal about how to solve this - is there something you think I've missed? Do you have specific concerns about the approach being discussed?

----------

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


More information about the Python-bugs-list mailing list