]> granicus.if.org Git - python/commitdiff
Fix ResourceWarning from subprocess pipe.
authorBrian Curtin <brian.curtin@gmail.com>
Fri, 5 Nov 2010 15:38:47 +0000 (15:38 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Fri, 5 Nov 2010 15:38:47 +0000 (15:38 +0000)
Lib/test/test_pdb.py

index 90bf6425cbfa33772c16ea7809cf4efbae2107c7..0d93b43e84bdb12011ea6ccb5495916266c3f07a 100644 (file)
@@ -590,6 +590,7 @@ class PdbTestCase(unittest.TestCase):
             stdin=subprocess.PIPE,
             stderr=subprocess.STDOUT,
             )
+        self.addCleanup(proc.stdout.close)
         stdout, stderr = proc.communicate(b'quit\n')
         self.assertNotIn(b'SyntaxError', stdout,
                          "Got a syntax error running test script under PDB")