We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e40c62 commit 7b7e9f6Copy full SHA for 7b7e9f6
Lib/test/test_ntpath.py
@@ -1368,6 +1368,17 @@ def test_ismount(self):
1368
self.assertTrue(ntpath.ismount(b"\\\\.\\c:\\"))
1369
self.assertTrue(ntpath.ismount(b"\\\\.\\C:\\"))
1370
1371
+ # Look for a non-existent drive letter that can be used to test
1372
+ # behaviour of ismount().
1373
+ for drive in "DEFGHIJKLMNOPQRSTUVWXYZ":
1374
+ if not ntpath.exists(drive + ":\\"):
1375
+ self.assertFalse(ntpath.ismount(drive + ":\\"))
1376
+ self.assertFalse(ntpath.ismount(drive + ":\\NotExist"))
1377
+ break
1378
+ else:
1379
+ if support.verbose:
1380
+ print("No missing drive found to test 'ismount'")
1381
+
1382
with os_helper.temp_dir() as d:
1383
self.assertFalse(ntpath.ismount(d))
1384
0 commit comments