[Python-Dev] stabilizing builds (original) (raw)
Thomas Wouters thomas at xs4all.net
Thu Jan 26 21:24:56 CET 2006
- Previous message: [Python-Dev] stabilizing builds
- Next message: [Python-Dev] stabilizing builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 25, 2006 at 01:59:18AM +0100, Thomas Wouters wrote:
[ iffy isatty behaviour on Solaris ]
Considering that:
- the approach for opening pty's, while not the only one, is the preferred way of doing it on Solaris,
- the actual pty's seem to be completely functional,
- the usual way to use pty's is not like the test does (inside a single process), and I'd say using pty's like the test does is extremely unlikely to happen in real life,
- testing inside the tty-creating process is quite possibly the reason for the fickleness of the test, since its behaviour isn't guaranteed anywhere,
- the test inside a subprocess, the normal way of using pty's, is not failing (as far as I can tell),
I'd like to check in the attached patch. It doesn't fix anything, it just removes this one test failure on Solaris. I don't want to skip the entire test, because it still tests whether everything else works as expected, and I don't want spurious failures as they can mask a real failure later in the test.
I'd need developer access back to check it in, though. Unless anyone objects, of course :)
-- Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -------------- next part -------------- Index: Lib/test/test_pty.py
--- Lib/test/test_pty.py (revision 42187) +++ Lib/test/test_pty.py (working copy) @@ -4,6 +4,13 @@ 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 ficke 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 @@ -26,7 +33,7 @@ # " An optional feature could not be imported " ... ? raise TestSkipped, "Pseudo-terminals (seemingly) not functional."
- if not os.isatty(slave_fd):
- if not os.isatty(slave_fd) and sys.platform not in fickle_isatty:
raise TestFailed, "slave_fd is not a tty"
IRIX apparently turns \n into \r\n. Allow that, but avoid allowing other
- Previous message: [Python-Dev] stabilizing builds
- Next message: [Python-Dev] stabilizing builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]