diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-05-21 20:36:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 20:36:36 (GMT) |
commit | b64182550f73e556344bd754d32e3be5d22a74e1 (patch) | |
tree | 094aeaee6451de4a0b897ea0669fd9409250497d /Lib/test/test_genericpath.py | |
parent | de8f530841b55885b919677a6938ab33d4a92f20 (diff) | |
download | cpython-b64182550f73e556344bd754d32e3be5d22a74e1.zip cpython-b64182550f73e556344bd754d32e3be5d22a74e1.tar.gz cpython-b64182550f73e556344bd754d32e3be5d22a74e1.tar.bz2 |
gh-118507 : Refactor `nt._path_is*` to improve applicability for other cases (GH-118755)
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r-- | Lib/test/test_genericpath.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index f407ee3..bf04b3f 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -135,6 +135,9 @@ class GenericTest: self.assertIs(self.pathmodule.exists(filename), False) self.assertIs(self.pathmodule.exists(bfilename), False) + self.assertIs(self.pathmodule.lexists(filename), False) + self.assertIs(self.pathmodule.lexists(bfilename), False) + create_file(filename) self.assertIs(self.pathmodule.exists(filename), True) @@ -145,14 +148,13 @@ class GenericTest: self.assertIs(self.pathmodule.exists(filename + '\x00'), False) self.assertIs(self.pathmodule.exists(bfilename + b'\x00'), False) - if self.pathmodule is not genericpath: - self.assertIs(self.pathmodule.lexists(filename), True) - self.assertIs(self.pathmodule.lexists(bfilename), True) + self.assertIs(self.pathmodule.lexists(filename), True) + self.assertIs(self.pathmodule.lexists(bfilename), True) - self.assertIs(self.pathmodule.lexists(filename + '\udfff'), False) - self.assertIs(self.pathmodule.lexists(bfilename + b'\xff'), False) - self.assertIs(self.pathmodule.lexists(filename + '\x00'), False) - self.assertIs(self.pathmodule.lexists(bfilename + b'\x00'), False) + self.assertIs(self.pathmodule.lexists(filename + '\udfff'), False) + self.assertIs(self.pathmodule.lexists(bfilename + b'\xff'), False) + self.assertIs(self.pathmodule.lexists(filename + '\x00'), False) + self.assertIs(self.pathmodule.lexists(bfilename + b'\x00'), False) @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") @unittest.skipIf(is_emscripten, "Emscripten pipe fds have no stat") |