[3.10] gh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194) (#99456)

gh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194)
(cherry picked from commit 367f552129)

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Christoph Anton Mitterer <calestyo@scientia.org>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-01-22 05:19:10 -08:00 committed by GitHub
parent caa6bcfb8c
commit 5717ab3ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -178,6 +178,8 @@ def test_islink(self):
def test_ismount(self):
self.assertIs(posixpath.ismount("/"), True)
self.assertIs(posixpath.ismount(b"/"), True)
self.assertIs(posixpath.ismount(FakePath("/")), True)
self.assertIs(posixpath.ismount(FakePath(b"/")), True)
def test_ismount_non_existent(self):
# Non-existent mountpoint.