diff options
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/test/test_result.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/unittest/test/test_result.py b/Lib/unittest/test/test_result.py index 7a1f65a..c02b8ef 100644 --- a/Lib/unittest/test/test_result.py +++ b/Lib/unittest/test/test_result.py @@ -1,4 +1,3 @@ -import os import sys import textwrap from cStringIO import StringIO, OutputType @@ -414,8 +413,8 @@ class TestOutputBuffering(unittest.TestCase): print 'foo' print >> sys.stderr, 'bar' - self.assertEqual(out_stream.getvalue(), 'foo%s' % os.linesep) - self.assertEqual(err_stream.getvalue(), 'bar%s' % os.linesep) + self.assertEqual(out_stream.getvalue(), 'foo\n') + self.assertEqual(err_stream.getvalue(), 'bar\n') self.assertEqual(result._original_stdout.getvalue(), '') self.assertEqual(result._original_stderr.getvalue(), '') @@ -468,13 +467,13 @@ class TestOutputBuffering(unittest.TestCase): expectedOutMessage = textwrap.dedent(""" Stdout: foo - """).replace('\n', os.linesep) + """) expectedErrMessage = '' if include_error: expectedErrMessage = textwrap.dedent(""" Stderr: bar - """).replace('\n', os.linesep) + """) expectedFullMessage = 'None\n%s%s' % (expectedOutMessage, expectedErrMessage) self.assertIs(test, self) |