summaryrefslogtreecommitdiff
path: root/Lib/test/test_ioctl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-01 12:16:51 +0300
committerGitHub <noreply@github.com>2019-09-01 12:16:51 +0300
commit1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 (patch)
tree8db3de2421c1d45d018a7a1dc03f42a0797acee2 /Lib/test/test_ioctl.py
parent5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe (diff)
downloadcpython-git-1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70.tar.gz
bpo-15999: Clean up of handling boolean arguments. (GH-15610)
* Use the 'p' format unit instead of manually called PyObject_IsTrue(). * Pass boolean value instead 0/1 integers to functions that needs boolean. * Convert some arguments to boolean only once.
Diffstat (limited to 'Lib/test/test_ioctl.py')
-rw-r--r--Lib/test/test_ioctl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_ioctl.py b/Lib/test/test_ioctl.py
index d1a5db9081..a2873582cf 100644
--- a/Lib/test/test_ioctl.py
+++ b/Lib/test/test_ioctl.py
@@ -48,7 +48,7 @@ class IoctlTests(unittest.TestCase):
else:
buf.append(fill)
with open("/dev/tty", "rb") as tty:
- r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1)
+ r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, True)
rpgrp = buf[0]
self.assertEqual(r, 0)
self.assertIn(rpgrp, ids)