8000
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 9d4af5a commit 1030d8aCopy full SHA for 1030d8a
Lib/test/test_ntpath.py
@@ -892,8 +892,10 @@ def test_isjunction(self):
892
893
@unittest.skipIf(sys.platform != 'win32', "drive letters are a windows concept")
894
def test_isfile_driveletter(self):
895
- current_drive = "\\\\.\\" + os.path.splitdrive(os.path.abspath(__file__))[0]
896
- self.assertFalse(os.path.isfile(current_drive))
+ drive = os.environ.get('SystemDrive')
+ if drive is None or len(drive) != 2 or drive[1] != ':':
897
+ raise unittest.SkipTest('SystemDrive is not defined or malformed')
898
+ self.assertFalse(os.path.isfile('\\\\.\\' + drive))
899
900
@unittest.skipIf(sys.platform != 'win32', "Fast paths are only for win32")
901
@cpython_only
0 commit comments