diff options
Diffstat (limited to 'tests/test_proactor_events.py')
-rw-r--r-- | tests/test_proactor_events.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_proactor_events.py b/tests/test_proactor_events.py index 8258238..08c622a 100644 --- a/tests/test_proactor_events.py +++ b/tests/test_proactor_events.py @@ -16,6 +16,7 @@ class ProactorSocketTransportTests(test_utils.TestCase): def setUp(self): self.loop = self.new_test_loop() + self.addCleanup(self.loop.close) self.proactor = mock.Mock() self.loop._proactor = self.proactor self.protocol = test_utils.make_test_protocol(asyncio.Protocol) @@ -459,6 +460,9 @@ class BaseProactorEventLoopTests(test_utils.TestCase): self.assertIsNone(self.loop._ssock) self.assertIsNone(self.loop._csock) + # Don't call close(): _close_self_pipe() cannot be called twice + self.loop._closed = True + def test_close(self): self.loop._close_self_pipe = mock.Mock() self.loop.close() |