Author: Gabriel <[email protected]>
Branch: 
Changeset: r58211:52fe31bb9ef9
Date: 2012-10-12 17:35 +0200
http://bitbucket.org/pypy/pypy/changeset/52fe31bb9ef9/

Log:    Test ioctl with int args

diff --git a/pypy/module/fcntl/test/test_fcntl.py 
b/pypy/module/fcntl/test/test_fcntl.py
--- a/pypy/module/fcntl/test/test_fcntl.py
+++ b/pypy/module/fcntl/test/test_fcntl.py
@@ -171,6 +171,17 @@
         res = fcntl.ioctl(0, TIOCGPGRP, "\x00\x00")
         assert res == expected
 
+    def test_ioctl_int(self):
+        import os
+        import fcntl
+        #from termios import TCFLSH, TCIOFLUSH
+        TCFLSH = 0x540b
+        TCIOFLUSH = 2
+
+        if not os.isatty(0):
+            skip("stdin is not a tty")
+        assert fcntl.ioctl(0, TCFLSH, TCIOFLUSH) == 0
+
     def test_lockf_with_ex(self):
         import fcntl
         f = open(self.tmp, "w")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to