diff options
-rw-r--r-- | Lib/test/test_ioctl.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_ioctl.py b/Lib/test/test_ioctl.py index a6a59c5..959d16e 100644 --- a/Lib/test/test_ioctl.py +++ b/Lib/test/test_ioctl.py @@ -8,6 +8,12 @@ except ImportError: if not hasattr(termios,'TIOCGPGRP'): raise TestSkipped("termios module doesn't have TIOCGPGRP") +try: + tty = open("/dev/tty", "r") + tty.close() +except IOError: + raise TestSkipped("Unable to open /dev/tty") + class IoctlTests(unittest.TestCase): def test_ioctl(self): pgrp = os.getpgrp() |