mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix ResourceWarning occuring on Windows. Close stdout/stderr pipes.
This commit is contained in:
parent
49998eec49
commit
8291af2354
1 changed files with 2 additions and 0 deletions
|
@ -489,6 +489,8 @@ class GCTests(unittest.TestCase):
|
|||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
p.stdout.close()
|
||||
p.stderr.close()
|
||||
self.assertEqual(p.returncode, 0)
|
||||
self.assertEqual(stdout.strip(), b"")
|
||||
return strip_python_stderr(stderr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue