summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-13 18:54:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-13 18:54:42 (GMT)
commit1a689189d272bf995bdcb8cfae6188bee08ccb7e (patch)
tree937db9285eeeb3a6642fca43320982463ff7d4ae
parent3e0cc0f12c30692774aa0355e06f85d672610419 (diff)
downloadcpython-1a689189d272bf995bdcb8cfae6188bee08ccb7e.zip
cpython-1a689189d272bf995bdcb8cfae6188bee08ccb7e.tar.gz
cpython-1a689189d272bf995bdcb8cfae6188bee08ccb7e.tar.bz2
Issue #15338: skip test_UNC_path when the current user doesn't have enough permissions to access the path.
-rw-r--r--Lib/test/test_import.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 1612a47..2f46d83 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -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')