[Python-checkins] cpython (2.7): #11963: fix Windows buildbots.
ezio.melotti
python-checkins at python.org
Mon Mar 11 02:21:25 CET 2013
http://hg.python.org/cpython/rev/3e14aafeca04
changeset: 82593:3e14aafeca04
branch: 2.7
parent: 82590:d25749c32bb4
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Mon Mar 11 03:21:08 2013 +0200
summary:
#11963: fix Windows buildbots.
files:
Lib/test/test_subprocess.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -319,22 +319,22 @@
def test_stdout_filedes_of_stdout(self):
# stdout is set to 1 (#1531862).
- # To avoid printing the '.\n' on stdout, we do something similar to
+ # To avoid printing the text on stdout, we do something similar to
# test_stdout_none (see above). The parent subprocess calls the child
# subprocess passing stdout=1, and this test uses stdout=PIPE in
# order to capture and check the output of the parent. See #11963.
code = ('import sys, subprocess; '
'rc = subprocess.call([sys.executable, "-c", '
' "import os, sys; sys.exit(os.write(sys.stdout.fileno(), '
- '\'.\\\\n\'))"], stdout=1); '
- 'assert rc == 2')
+ '\'test with stdout=1\'))"], stdout=1); '
+ 'assert rc == 18')
p = subprocess.Popen([sys.executable, "-c", code],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.addCleanup(p.stdout.close)
self.addCleanup(p.stderr.close)
out, err = p.communicate()
self.assertEqual(p.returncode, 0, err)
- self.assertEqual(out, '.\n')
+ self.assertEqual(out.rstrip(), 'test with stdout=1')
def test_cwd(self):
tmpdir = tempfile.gettempdir()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list