gh-124917: Allow keyword args to os.path.exists/lexists on Windows (#124918)

This commit is contained in:
Jelle Zijlstra 2024-10-11 12:41:59 -07:00 committed by GitHub
parent a00221e5a7
commit cc2938a189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 77 additions and 13 deletions

View file

@ -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):