summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-27 14:20:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-27 14:20:08 (GMT)
commit79fd962652a60f04ecc7becb116c330063b1706e (patch)
treee5caad3b0248b10d4f1f7be634027f2ff778d247 /Lib/test/test_asyncio
parent0b4e355b8e7729d1e3a67da8539b3701f4e546ff (diff)
downloadcpython-79fd962652a60f04ecc7becb116c330063b1706e.zip
cpython-79fd962652a60f04ecc7becb116c330063b1706e.tar.gz
cpython-79fd962652a60f04ecc7becb116c330063b1706e.tar.bz2
asyncio: Fix _SelectorTransport.__repr__() if the event loop is closed
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_selector_events.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index f64e40d..9478b95 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -62,6 +62,11 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
self.loop.add_reader._is_coroutine = False
transport = self.loop._make_socket_transport(m, asyncio.Protocol())
self.assertIsInstance(transport, _SelectorSocketTransport)
+
+ # Calling repr() must not fail when the event loop is closed
+ self.loop.close()
+ repr(transport)
+
close_transport(transport)
@unittest.skipIf(ssl is None, 'No ssl module')