Fix a failing test on FreeBSD: ttys are seekable in FreeBSD, too.

This commit is contained in:
Hye-Shik Chang 2007-08-13 13:21:33 +00:00
parent 49d90bc9ef
commit caf871ad32
1 changed files with 3 additions and 2 deletions

View File

@ -136,8 +136,9 @@ class OtherFileTests(unittest.TestCase):
f = _fileio._FileIO("/dev/tty", "a") f = _fileio._FileIO("/dev/tty", "a")
self.assertEquals(f.readable(), False) self.assertEquals(f.readable(), False)
self.assertEquals(f.writable(), True) self.assertEquals(f.writable(), True)
if sys.platform != "darwin": if sys.platform != "darwin" and \
# Somehow /dev/tty appears seekable on OSX not sys.platform.startswith('freebsd'):
# Somehow /dev/tty appears seekable on some BSDs
self.assertEquals(f.seekable(), False) self.assertEquals(f.seekable(), False)
self.assertEquals(f.isatty(), True) self.assertEquals(f.isatty(), True)
f.close() f.close()