]> granicus.if.org Git - python/commitdiff
Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
authorRoss Lagerwall <rosslagerwall@gmail.com>
Sat, 26 Mar 2011 19:19:57 +0000 (21:19 +0200)
committerRoss Lagerwall <rosslagerwall@gmail.com>
Sat, 26 Mar 2011 19:19:57 +0000 (21:19 +0200)
Patch by Ben Hayden.

Lib/test/test_subprocess.py
Misc/ACKS
Misc/NEWS

index 410849fc286ece42a48d28c1ab7b938b9205000b..837bdb50a45971c8e4582817735d96fba6e90bec 100644 (file)
@@ -874,6 +874,7 @@ class ProcessTestCase(BaseTestCase):
                                  stdout=subprocess.PIPE,
                                  bufsize=0)
             f = p.stdout
+            self.addCleanup(f.close)
             try:
                 self.assertEqual(f.read(4), b"appl")
                 self.assertIn(f, select.select([f], [], [], 0.0)[0])
index 99554da92d645b462e126ae8baaf0c9c8f1dcaec..17091ebabf13bd740ddc7a6fdc0254064221edf6 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -325,6 +325,7 @@ Jason Harper
 Larry Hastings
 Shane Hathaway
 Rycharde Hawkes
+Ben Hayden
 Jochen Hayek
 Christian Heimes
 Thomas Heller
index 6825931972bf43c576d1939bd9b7fd563ad798dc..8e69a841cb133d66daae79bc36eb54031b28112a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -48,6 +48,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
+  Patch by Ben Hayden.
+
 - Issue #5537: Fix time2isoz() and time2netscape() functions of
   httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.