nicer cleanup plus a comment

This commit is contained in:
Jean-Paul Calderone 2020-09-25 09:31:57 -04:00
parent b218b5426b
commit 05def35c26

View File

@ -88,9 +88,9 @@ class IntroducerWeb(unittest.TestCase):
self.port_assigner = SameProcessStreamEndpointAssigner()
self.port_assigner.setUp()
self.addCleanup(self.port_assigner.tearDown)
def tearDown(self):
return flushEventualQueue(None)
# Anything using Foolscap leaves some timer trash in the reactor that
# we have to arrange to have cleaned up.
self.addCleanup(lambda: flushEventualQueue(None))
@defer.inlineCallbacks
def test_welcome(self):