more robust

This commit is contained in:
meejah 2022-09-01 21:22:45 -06:00
parent 1e6381ca7f
commit 768829e993

View File

@ -646,7 +646,8 @@ class OnStdinCloseTests(SyncTestCase):
on_stdin_close(reactor, onclose)
self.assertEqual(called, [])
reader = list(reactor.readers)[0]
for reader in reactor.getReaders():
reader.loseConnection()
reader.loseConnection()
reactor.advance(1) # ProcessReader does a callLater(0, ..)
@ -665,7 +666,8 @@ class OnStdinCloseTests(SyncTestCase):
on_stdin_close(reactor, onclose)
self.assertEqual(called, [])
reader = list(reactor.readers)[0]
for reader in reactor.getReaders():
reader.loseConnection()
reader.loseConnection()
reactor.advance(1) # ProcessReader does a callLater(0, ..)