[Python-checkins] python/dist/src/Lib/test test_ioctl.py,1.1,1.2

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Wed, 19 Mar 2003 20:33:19 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv11301/Lib/test

Modified Files:
	test_ioctl.py 
Log Message:
Skip the ioctl test if we can't open /dev/tty.  This happens on
Solaris (and probably other Unixes) when run without a terminal
(eg, from cron or at).


Index: test_ioctl.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_ioctl.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_ioctl.py	3 Mar 2003 12:29:42 -0000	1.1
--- test_ioctl.py	20 Mar 2003 04:33:16 -0000	1.2
***************
*** 9,12 ****
--- 9,18 ----
      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):