From 994ad6c775b66073e296901aa178e27aa120bb99 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Fri, 5 Nov 2010 15:38:47 +0000 Subject: [PATCH] Fix ResourceWarning from subprocess pipe. --- Lib/test/test_pdb.py | 1 + 1 file changed, 1 insertion(+) 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") -- 2.40.0