> Index: test_ioctl.py
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Lib/test/test_ioctl.py,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -d -r1.2 -r1.3
> --- test_ioctl.py 20 Mar 2003 04:33:16 -0000 1.2
> +++ test_ioctl.py 14 Sep 2005 18:09:41 -0000 1.3
> @@ -16,19 +16,23 @@
>
> class IoctlTests(unittest.TestCase):
> def test_ioctl(self):
> - pgrp = os.getpgrp()
> + # If this process has been put into the background, TIOCGPGRP returns
> + # the session ID instead of the process group id.
> + ids = (os.getpgrp(), os.getsid(0))
> tty = open("/dev/tty", "r")
> r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
> - self.assertEquals(pgrp, struct.unpack("i", r)[0])
> + rpgrp = struct.unpack("i", r)[0]
> + self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids))
With the change to use unsigned ints in pwd and grp modules, should
the struct.unpack() use "I" (capital i) instead of "i"?
n
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com