From: Brian Curtin Date: Fri, 5 Nov 2010 15:38:47 +0000 (+0000) Subject: Fix ResourceWarning from subprocess pipe. X-Git-Tag: v3.2a4~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=994ad6c775b66073e296901aa178e27aa120bb99;p=python Fix ResourceWarning from subprocess pipe. --- diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 90bf6425cb..0d93b43e84 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -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")