Fix ResourceWarning occuring on Windows. Close stdout/stderr pipes.

This commit is contained in:
Brian Curtin 2010-11-01 16:40:17 +00:00
parent 49998eec49
commit 8291af2354
1 changed files with 2 additions and 0 deletions

View File

@ -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)