summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_unix_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-15 12:16:50 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-15 12:16:50 (GMT)
commit41ed958ee6f0ff15836e11013d1cada8c3ae90fc (patch)
tree90c7799305553685e0b91cd91edf97768a080421 /Lib/test/test_asyncio/test_unix_events.py
parent7e222f411cda575c336eaabbc4aa4d5b8addab89 (diff)
downloadcpython-41ed958ee6f0ff15836e11013d1cada8c3ae90fc.zip
cpython-41ed958ee6f0ff15836e11013d1cada8c3ae90fc.tar.gz
cpython-41ed958ee6f0ff15836e11013d1cada8c3ae90fc.tar.bz2
Issue #23243: Fix asyncio._UnixWritePipeTransport.close()
Do nothing if the transport is already closed. Before it was not possible to close the transport twice.
Diffstat (limited to 'Lib/test/test_asyncio/test_unix_events.py')
-rw-r--r--Lib/test/test_asyncio/test_unix_events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
index 5f4b024..4a68ce3 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -766,6 +766,9 @@ class UnixWritePipeTransportTests(test_utils.TestCase):
tr.close()
tr.write_eof.assert_called_with()
+ # closing the transport twice must not fail
+ tr.close()
+
def test_close_closing(self):
tr = unix_events._UnixWritePipeTransport(
self.loop, self.pipe, self.protocol)