Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8a5769

Browse files
committed
Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
Patch by Ben Hayden.
1 parent 89461ef commit b8a5769

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,7 @@ def test_select_unbuffered(self):
874874
stdout=subprocess.PIPE,
875875
bufsize=0)
876876
f = p.stdout
877+
self.addCleanup(f.close)
877878
try:
878879
self.assertEqual(f.read(4), b"appl")
879880
self.assertIn(f, select.select([f], [], [], 0.0)[0])

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ Jason Harper
325325
Larry Hastings
326326
Shane Hathaway
327327
Rycharde Hawkes
328+
Ben Hayden
328329
Jochen Hayek
329330
Christian Heimes
330331
Thomas Heller

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ Core and Builtins
4848
Library
4949
-------
5050

51+
- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
52+
Patch by Ben Hayden.
53+
5154
- Issue #5537: Fix time2isoz() and time2netscape() functions of
5255
httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.
5356

0 commit comments

Comments
 (0)