Commit b0f48abd authored by Thomas Heller's avatar Thomas Heller

Skip testing the special file "/dev/tty" on Windows. This test does

weird things if someone has a "\dev" directory on the current drive.
parent fdeee3a6
...@@ -124,12 +124,13 @@ class OtherFileTests(unittest.TestCase): ...@@ -124,12 +124,13 @@ class OtherFileTests(unittest.TestCase):
self.assertEquals(f.isatty(), False) self.assertEquals(f.isatty(), False)
f.close() f.close()
if sys.platform != "win32":
try: try:
f = _fileio._FileIO("/dev/tty", "a") f = _fileio._FileIO("/dev/tty", "a")
except EnvironmentError: except EnvironmentError:
# When run in a cron job there just aren't any ttys, # When run in a cron job there just aren't any
# so skip the test. This also handles Windows and # ttys, so skip the test. This also handles other
# other OS'es that don't support /dev/tty. # OS'es that don't support /dev/tty.
pass pass
else: else:
f = _fileio._FileIO("/dev/tty", "a") f = _fileio._FileIO("/dev/tty", "a")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment