mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
Try to stop the test from leaking and yet still work on windows
This commit is contained in:
parent
c859b5c04e
commit
00ac0d22f3
1 changed files with 2 additions and 3 deletions
|
@ -6,12 +6,11 @@ import subprocess
|
||||||
|
|
||||||
class CmdLineTest(unittest.TestCase):
|
class CmdLineTest(unittest.TestCase):
|
||||||
def start_python(self, cmd_line):
|
def start_python(self, cmd_line):
|
||||||
inst = popen2.Popen4('%s %s' % (sys.executable, cmd_line))
|
outfp, infp = popen2.popen4('%s %s' % (sys.executable, cmd_line))
|
||||||
outfp, infp = inst.fromchild, inst.tochild
|
|
||||||
infp.close()
|
infp.close()
|
||||||
data = outfp.read()
|
data = outfp.read()
|
||||||
outfp.close()
|
outfp.close()
|
||||||
inst.wait()
|
popen2._cleanup()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def exit_code(self, cmd_line):
|
def exit_code(self, cmd_line):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue