]> granicus.if.org Git - python/commitdiff
Try to stop the test from leaking and yet still work on windows
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 17 Apr 2006 02:39:37 +0000 (02:39 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 17 Apr 2006 02:39:37 +0000 (02:39 +0000)
Lib/test/test_cmd_line.py

index dd27b511a2cf98cafb2bc069766ae9a2b1a98160..3fa7930451848a5917199e4e4c84329737f668dc 100644 (file)
@@ -6,12 +6,11 @@ import subprocess
 
 class CmdLineTest(unittest.TestCase):
     def start_python(self, cmd_line):
-        inst = popen2.Popen4('%s %s' % (sys.executable, cmd_line))
-        outfp, infp = inst.fromchild, inst.tochild
+        outfp, infp = popen2.popen4('%s %s' % (sys.executable, cmd_line))
         infp.close()
         data = outfp.read()
         outfp.close()
-        inst.wait()
+        popen2._cleanup()
         return data
 
     def exit_code(self, cmd_line):