diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-10-11 12:41:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-11 12:41:59 -0700 |
commit | cc2938a18967c9d462ebb18bc09f73e4364aa7d2 (patch) | |
tree | 69992d94dacdaeb9fecc3cac251f1cb94e4a184a /Lib/test/test_genericpath.py | |
parent | a00221e5a70e54a281ba0e2cff8d85cd37ae305f (diff) | |
download | cpython-cc2938a18967c9d462ebb18bc09f73e4364aa7d2.tar.gz cpython-cc2938a18967c9d462ebb18bc09f73e4364aa7d2.zip |
gh-124917: Allow keyword args to os.path.exists/lexists on Windows (#124918)
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r-- | Lib/test/test_genericpath.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index bf04b3fecf7..6d2593cb4cf 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -156,6 +156,10 @@ class GenericTest: self.assertIs(self.pathmodule.lexists(filename + '\x00'), False) self.assertIs(self.pathmodule.lexists(bfilename + b'\x00'), False) + # Keyword arguments are accepted + self.assertIs(self.pathmodule.exists(path=filename), True) + self.assertIs(self.pathmodule.lexists(path=filename), True) + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") @unittest.skipIf(is_emscripten, "Emscripten pipe fds have no stat") def test_exists_fd(self): |