gh-118507 : Refactor ntpath native functions (gh-119381)

This refactoring will make future backports easier without changing behaviours,
apart from correcting a bug when passing a pipe to `ntpath.isfile`.
This commit is contained in:
Nice Zombies 2024-05-22 16:49:26 +02:00 committed by GitHub
parent 8c96850161
commit 874a4f7d08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 372 additions and 416 deletions

View file

@ -135,6 +135,10 @@ class GenericTest:
self.assertIs(self.pathmodule.exists(filename), False)
self.assertIs(self.pathmodule.exists(bfilename), False)
if self.pathmodule is not genericpath:
self.assertIs(self.pathmodule.lexists(filename), False)
self.assertIs(self.pathmodule.lexists(bfilename), False)
create_file(filename)
self.assertIs(self.pathmodule.exists(filename), True)