summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/posixpath.py1
-rw-r--r--Lib/test/test_posixpath.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 5e1ebe3..5b4d78b 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -195,6 +195,7 @@ def ismount(path):
if stat.S_ISLNK(s1.st_mode):
return False
+ path = os.fspath(path)
if isinstance(path, bytes):
parent = join(path, b'..')
else:
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index c644f88..8a1dd13 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -178,6 +178,8 @@ class PosixPathTest(unittest.TestCase):
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.