summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2012-02-22 18:50:04 (GMT)
committerBarry Warsaw <barry@python.org>2012-02-22 18:50:04 (GMT)
commit56fd6617b5c788bb5563541fe5687d1120dd314d (patch)
treec12437969a3b2f5810412f5cd675648cb3f1069e
parent6a9005b4eb957f21020804f77f9f58ab6a957b98 (diff)
downloadcpython-56fd6617b5c788bb5563541fe5687d1120dd314d.zip
cpython-56fd6617b5c788bb5563541fe5687d1120dd314d.tar.gz
cpython-56fd6617b5c788bb5563541fe5687d1120dd314d.tar.bz2
Backport from 2.7:
changeset: 75153:9b7c6dd19e25 branch: 2.7 parent: 75151:b1a02c17b327 user: Antoine Pitrou <solipsis@pitrou.net> date: Tue Feb 21 22:02:04 2012 +0100 files: Lib/test/test_os.py
-rw-r--r--Lib/test/test_os.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 0561499..7ad5113 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -528,12 +528,13 @@ class URandomTests (unittest.TestCase):
'import os, sys',
'data = os.urandom(%s)' % count,
'sys.stdout.write(data)',
- 'sys.stdout.flush()'))
+ 'sys.stdout.flush()',
+ 'print >> sys.stderr, (len(data), data)'))
cmd_line = [sys.executable, '-c', code]
p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
- out = test_support.strip_python_stderr(out)
+ self.assertEqual(p.wait(), 0, (p.wait(), err))
self.assertEqual(len(out), count)
return out