diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-04-03 02:33:55 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-04-03 02:33:55 (GMT) |
commit | 93232660bb96b8ab10de393850007b49b0cc595c (patch) | |
tree | e4f96616774bf5b79c05d1fa8a2879c9c6b61146 /Lib/unittest | |
parent | 9b4ee12e899a99cc82ef52925d03029ce66bf2c6 (diff) | |
download | cpython-93232660bb96b8ab10de393850007b49b0cc595c.zip cpython-93232660bb96b8ab10de393850007b49b0cc595c.tar.gz cpython-93232660bb96b8ab10de393850007b49b0cc595c.tar.bz2 |
Another attempt at a fix for unittest.test.test_result for windows line endings
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) |