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 fe81ba8 commit 1b3267cCopy full SHA for 1b3267c
1 file changed
Lib/test/test_ntpath.py
@@ -1248,6 +1248,13 @@ def test_isfile_invalid_paths(self):
1248
self.assertIs(ntpath.isfile('/tmp\x00abcds'), False)
1249
self.assertIs(ntpath.isfile(b'/tmp\x00abcds'), False)
1250
1251
+ @unittest.skipIf(sys.platform != 'win32', "drive letters are a windows concept")
1252
+ def test_isfile_driveletter(self):
1253
+ drive = os.environ.get('SystemDrive')
1254
+ if drive is None or len(drive) != 2 or drive[1] != ':':
1255
+ raise unittest.SkipTest('SystemDrive is not defined or malformed')
1256
+ self.assertFalse(os.path.isfile('\\\\.\\' + drive))
1257
+
1258
@unittest.skipUnless(hasattr(os, 'pipe'), "need os.pipe()")
1259
def test_isfile_anonymous_pipe(self):
1260
pr, pw = os.pipe()
0 commit comments