Commit b2fcebb0 authored by Tim Golden's avatar Tim Golden

issue9035: Prevent Windows-specific tests from running on non-Windows platforms

parent 6b528067
...@@ -274,22 +274,22 @@ class TestNtpath(unittest.TestCase): ...@@ -274,22 +274,22 @@ class TestNtpath(unittest.TestCase):
with support.temp_dir() as d: with support.temp_dir() as d:
self.assertFalse(ntpath.ismount(d)) self.assertFalse(ntpath.ismount(d))
# if sys.platform == "win32":
# Make sure the current folder isn't the root folder #
# (or any other volume root). The drive-relative # Make sure the current folder isn't the root folder
# locations below cannot then refer to mount points # (or any other volume root). The drive-relative
# # locations below cannot then refer to mount points
drive, path = ntpath.splitdrive(sys.executable) #
with support.change_cwd(os.path.dirname(sys.executable)): drive, path = ntpath.splitdrive(sys.executable)
self.assertFalse(ntpath.ismount(drive.lower())) with support.change_cwd(os.path.dirname(sys.executable)):
self.assertFalse(ntpath.ismount(drive.upper())) self.assertFalse(ntpath.ismount(drive.lower()))
self.assertFalse(ntpath.ismount(drive.upper()))
self.assertTrue(ntpath.ismount("\\\\localhost\\c$"))
self.assertTrue(ntpath.ismount("\\\\localhost\\c$\\")) self.assertTrue(ntpath.ismount("\\\\localhost\\c$"))
self.assertTrue(ntpath.ismount("\\\\localhost\\c$\\"))
self.assertTrue(ntpath.ismount(b"\\\\localhost\\c$"))
self.assertTrue(ntpath.ismount(b"\\\\localhost\\c$\\")) self.assertTrue(ntpath.ismount(b"\\\\localhost\\c$"))
self.assertTrue(ntpath.ismount(b"\\\\localhost\\c$\\"))
class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase): class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase):
pathmodule = ntpath pathmodule = ntpath
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment