diff options
Diffstat (limited to 'Lib/test/test_pty.py')
-rw-r--r-- | Lib/test/test_pty.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 99e01b6..59e5162 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -4,13 +4,6 @@ from test.test_support import verbose, TestFailed, TestSkipped TEST_STRING_1 = "I wish to buy a fish license.\n" TEST_STRING_2 = "For my pet fish, Eric.\n" -# Solaris (at least 2.9 and 2.10) seem to have a fickle isatty(). The first -# test below, testing the result of os.openpty() for tty-ness, sometimes -# (but not always) fails. The second isatty test, in the sub-process, always -# works. Allow that fickle first test to fail on these platforms, since it -# doesn't actually affect functionality. -fickle_isatty = ["sunos5"] - if verbose: def debug(msg): print msg @@ -31,11 +24,11 @@ def normalize_output(data): # OSF/1 (Tru64) apparently turns \n into \r\r\n. if data.endswith('\r\r\n'): - return data[:-3] + '\n' + return data.replace('\r\r\n', '\n') # IRIX apparently turns \n into \r\n. if data.endswith('\r\n'): - return data[:-2] + '\n' + return data.replace('\r\n', '\n') return data @@ -54,7 +47,7 @@ def test_basic_pty(): # " An optional feature could not be imported " ... ? raise TestSkipped, "Pseudo-terminals (seemingly) not functional." - if not os.isatty(slave_fd) and sys.platform not in fickle_isatty: + if not os.isatty(slave_fd): raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") |