mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merged revisions 86202 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86202 | brian.curtin | 2010-11-05 10:40:27 -0500 (Fri, 05 Nov 2010) | 2 lines Fix ResourceWarning from subprocess pipes being left open. ........
This commit is contained in:
parent
f4f0c8be3d
commit
4b4fa21183
1 changed files with 2 additions and 0 deletions
|
@ -178,6 +178,7 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''')
|
|||
(p, e) = self.STRINGS[-1]
|
||||
process = subprocess.Popen([sys.executable, "-mquopri"],
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
self.addCleanup(process.stdout.close)
|
||||
cout, cerr = process.communicate(p)
|
||||
# On Windows, Python will output the result to stdout using
|
||||
# CRLF, as the mode of stdout is text mode. To compare this
|
||||
|
@ -188,6 +189,7 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''')
|
|||
(p, e) = self.STRINGS[-1]
|
||||
process = subprocess.Popen([sys.executable, "-mquopri", "-d"],
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
self.addCleanup(process.stdout.close)
|
||||
cout, cerr = process.communicate(e)
|
||||
self.assertEqual(cout.splitlines(), p.splitlines())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue