Remove the workaround for \n -> \r\n transformations in
authorZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 20:07:15 +0000 (20:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 20:07:15 +0000 (20:07 -0000)
SpawnTestCase.testLogfile() since the problem is solved
by the patch from bug #198491. (trunk r8474)

svn path=/main/branches/2.1.2/; revision=8551

tests/portage/test_spawn.py

index 5a80106211e68f2c6c405dbd8efd6f1f8bdf478f..596dc471e8b471ec1b5ff47c7d327c80d3ac0ebc 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: