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

(cherry picked from commit cc2938a189)
This commit is contained in:
Jelle Zijlstra 2024-10-11 15:18:33 -07:00 committed by GitHub
parent 488807a52a
commit e646cc369e
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):