diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-22 00:29:34 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-22 00:29:34 (GMT) |
| commit | f15fbe9991b9cb93d0b4c08e9931ac0770c4e40a (patch) | |
| tree | ef94a830f296172cfcf69e179b1996d372c39193 /Lib/test/test_genericpath.py | |
| parent | f371565169438c3b93763f298d5171985607ab5d (diff) | |
| download | cpython-f15fbe9991b9cb93d0b4c08e9931ac0770c4e40a.zip cpython-f15fbe9991b9cb93d0b4c08e9931ac0770c4e40a.tar.gz cpython-f15fbe9991b9cb93d0b4c08e9931ac0770c4e40a.tar.bz2 | |
gh-118507 : Refactor `nt._path_is*` to improve applicability for other cases (GH-118755)
(cherry picked from commit b64182550f73e556344bd754d32e3be5d22a74e1)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
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") |
