diff options
author | Martin Panter <vadmium> | 2015-09-09 01:01:13 +0000 |
---|---|---|
committer | Martin Panter <vadmium> | 2015-09-09 01:01:13 +0000 |
commit | bf19d169504823c258a9aae4bf61c8df9ff5987f (patch) | |
tree | e7c2737588806aeb3e4b46a0ca1beba7d8c31065 /Lib/test/test_posix.py | |
parent | 5558d4f2f89b86bb0aab35fff01c2b51f1013f33 (diff) | |
download | cpython-git-bf19d169504823c258a9aae4bf61c8df9ff5987f.tar.gz |
Issue #23738: Document and test actual keyword parameter names
Also fix signature because os.utime(..., ns=None) is not allowed.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index aeb8924107..d7679896ce 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -443,6 +443,14 @@ class PosixTester(unittest.TestCase): else: self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode)) + # Keyword arguments are also supported + support.unlink(support.TESTFN) + try: + posix.mknod(path=support.TESTFN, mode=mode, device=0, + dir_fd=None) + except OSError as e: + self.assertIn(e.errno, (errno.EPERM, errno.EINVAL)) + @unittest.skipUnless(hasattr(posix, 'stat'), 'test needs posix.stat()') @unittest.skipUnless(hasattr(posix, 'makedev'), 'test needs posix.makedev()') def test_makedev(self): |