[Python-checkins] cpython: Fix ResourceWarning in test_asyncio.test_windows_events:

victor.stinner python-checkins at python.org
Sat Jan 11 00:16:58 CET 2014


http://hg.python.org/cpython/rev/52fbc7bb78ad
changeset:   88406:52fbc7bb78ad
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sat Jan 11 00:16:50 2014 +0100
summary:
  Fix ResourceWarning in test_asyncio.test_windows_events:
close the write end of the socket pair

files:
  Lib/test/test_asyncio/test_windows_events.py |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py
--- a/Lib/test/test_asyncio/test_windows_events.py
+++ b/Lib/test/test_asyncio/test_windows_events.py
@@ -49,6 +49,7 @@
         trans.close()
         self.loop.run_until_complete(f)
         self.assertEqual(f.result(), b'')
+        b.close()
 
     def test_double_bind(self):
         ADDRESS = r'\\.\pipe\test_double_bind-%s' % os.getpid()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list