Remove the workaround for \n -> \r\n transformations in
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Nov 2007 03:35:38 +0000 (03:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Nov 2007 03:35:38 +0000 (03:35 -0000)
SpawnTestCase.testLogfile() since the problem is solved
by the patch from bug #198491.

svn path=/main/trunk/; revision=8474

pym/portage/tests/ebuild/test_spawn.py

index f582723bcbd5bf1fa4835b485c01bce3db6502dd..1ba6e58478952043f576f553903498f55055c36c 100644 (file)
@@ -30,10 +30,11 @@ class SpawnTestCase(TestCase):
                        f = open(logfile, 'r')
                        log_content = f.read()
                        f.close()
-                       # When logging passes through a pty, it's lines will be separated
-                       # by '\r\n', so use splitlines before comparing results.
-                       self.assertEqual(test_string.splitlines(),
-                               log_content.splitlines())
+                       # When logging passes through a pty, this comparison will fail
+                       # unless the oflag terminal attributes have the termios.OPOST
+                       # bit disabled. Otherwise, tranformations such as \n -> \r\n
+                       # may occur.
+                       self.assertEqual(test_string, log_content)
                finally:
                        if logfile:
                                try: