diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:54:49 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:54:49 +0100 |
commit | 1acecaf9ed3ad034135ba55ee886f77cdc741f88 (patch) | |
tree | 39bca053025927f50c954789e15622ed28cf3757 /tests | |
parent | 798f8fa56afad67358946e7ff1ec005050c146fb (diff) | |
download | trollius-1acecaf9ed3ad034135ba55ee886f77cdc741f88.tar.gz |
Python issue #23243: Fix _UnixWritePipeTransport.close()
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_unix_events.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_unix_events.py b/tests/test_unix_events.py index 5f4b024..4a68ce3 100644 --- a/tests/test_unix_events.py +++ b/tests/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) |