summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_selector_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-15 14:24:55 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-15 14:24:55 +0100
commitab8848bc2a64930e0e9a2e56592bb692fb31d9e9 (patch)
treefabea6e538acba5235e9614891c75bb9780843c8 /Lib/test/test_asyncio/test_selector_events.py
parent4bf22e033e975f61c33752db5a3764dc0f7d0b03 (diff)
downloadcpython-git-ab8848bc2a64930e0e9a2e56592bb692fb31d9e9.tar.gz
asyncio: Close transports in tests
* Use test_utils.run_briefly() to execute pending calls to really close transports * sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport * pipe test: the test doesn't close explicitly the PipeHandle, so ignore the warning instead * test_popen: use the context manager ("with p:") to explicitly close pipes
Diffstat (limited to 'Lib/test/test_asyncio/test_selector_events.py')
-rw-r--r--Lib/test/test_asyncio/test_selector_events.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index f99d04d44c..ad86ada342 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -1180,6 +1180,8 @@ class SelectorSslTransportTests(test_utils.TestCase):
self.sslsock.do_handshake.side_effect = exc
with test_utils.disable_logger():
transport._on_handshake(0)
+ transport.close()
+ test_utils.run_briefly(self.loop)
def test_pause_resume_reading(self):
tr = self._make_one()