Commit 1a689189 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #15338: skip test_UNC_path when the current user doesn't have enough...

Issue #15338: skip test_UNC_path when the current user doesn't have enough permissions to access the path.
parent 3e0cc0f1
......@@ -427,6 +427,13 @@ class PathsTests(unittest.TestCase):
drive = path[0]
unc = "\\\\%s\\%s$"%(hn, drive)
unc += path[2:]
try:
os.listdir(unc)
except OSError as e:
if e.errno in (errno.EPERM, errno.EACCES):
# See issue #15338
self.skipTest("cannot access administrative share %r" % (unc,))
raise
sys.path.append(path)
mod = __import__("test_trailing_slash")
self.assertEqual(mod.testdata, 'test_trailing_slash')
......
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