Since Trac appears to be not accepting new issues, posting here before I
forget:
Reproducer:
{{{
from twisted.trial.unittest import TestCase
class StatefulCleanup:
called = False
def __call__(self):
if self.called:
raise AssertionError('Called more than once')
self.called = True
class TestAddCleanup(TestCase):
def setUp(self):
self.addCleanup(StatefulCleanup())
def testIt(self):
pass
}}}
If run with trial -u, the AssertionError will be issued.
Chris
_______________________________________________
Twisted mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/twisted.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/ZVN2HO4UVLYNUEWC2Y4HBUONFIGBFLHR/
Code of Conduct: https://twisted.org/conduct