diff options
author | Guido van Rossum <guido@python.org> | 2007-05-10 14:04:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-10 14:04:07 (GMT) |
commit | 5205653a9ef70138cb6b9ab7bdfe8238602dfdab (patch) | |
tree | cdd070c378faf2075e1d6e2655a76828f1e93c52 /Lib/test | |
parent | a4c612845aceed4a9f1ef25328b0cfa39d5038ca (diff) | |
download | cpython-5205653a9ef70138cb6b9ab7bdfe8238602dfdab.zip cpython-5205653a9ef70138cb6b9ab7bdfe8238602dfdab.tar.gz cpython-5205653a9ef70138cb6b9ab7bdfe8238602dfdab.tar.bz2 |
Merged revisions 55184-55224 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
........
r55186 | guido.van.rossum | 2007-05-08 10:37:51 -0700 (Tue, 08 May 2007) | 2 lines
Don't die if /dev/tty doesn't exist; just skip that part of the test.
........
r55204 | guido.van.rossum | 2007-05-09 10:55:11 -0700 (Wed, 09 May 2007) | 3 lines
Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
instead of memchr(). Please backport; the original code was clearly wrong.
........
r55221 | neal.norwitz | 2007-05-09 22:49:20 -0700 (Wed, 09 May 2007) | 1 line
Always skip compiler and tranformer tests for now since they currently fail.
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_fileio.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py index 56fef11..be2f781 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py @@ -124,7 +124,14 @@ class OtherFileTests(unittest.TestCase): self.assertEquals(f.isatty(), False) f.close() - if not sys.platform.startswith("win"): + try: + f = _fileio._FileIO("/dev/tty", "a") + except EnvironmentError: + # When run in a cron job there just aren't any ttys, + # so skip the test. This also handles Windows and + # other OS'es that don't support /dev/tty. + pass + else: f = _fileio._FileIO("/dev/tty", "a") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) |