diff options
author | Guido van Rossum <guido@python.org> | 2001-09-11 14:24:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-11 14:24:35 (GMT) |
commit | dc795b82aaa6943e1760ec34515d5dd82a57c4ca (patch) | |
tree | 4260ee5db694f530cb402189cce568cd65edb6ca /Lib/test/test_pty.py | |
parent | 779ce4a73a0277566ab1e9045da58d89c9cc4efb (diff) | |
download | cpython-dc795b82aaa6943e1760ec34515d5dd82a57c4ca.zip cpython-dc795b82aaa6943e1760ec34515d5dd82a57c4ca.tar.gz cpython-dc795b82aaa6943e1760ec34515d5dd82a57c4ca.tar.bz2 |
Fix the second reincarnation of SF #456395 -- failure on IRIX. This
time use .replace() to change all \r\n into \n, not just the last one.
Diffstat (limited to 'Lib/test/test_pty.py')
-rw-r--r-- | Lib/test/test_pty.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 7d72b76..204ff56 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -34,17 +34,13 @@ if not os.isatty(slave_fd): debug("Writing to slave_fd") os.write(slave_fd, TEST_STRING_1) s1 = os.read(master_fd, 1024) -if s1[-2:] == "\r\n": - s1 = s1[:-2] + "\n" -sys.stdout.write(s1) +sys.stdout.write(s1.replace("\r\n", "\n")) debug("Writing chunked output") os.write(slave_fd, TEST_STRING_2[:5]) os.write(slave_fd, TEST_STRING_2[5:]) s2 = os.read(master_fd, 1024) -if s2[-2:] == "\r\n": - s2 = s2[:-2] + "\n" -sys.stdout.write(s2) +sys.stdout.write(s2.replace("\r\n", "\n")) os.close(slave_fd) os.close(master_fd) |