summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
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)
commit68f4247b656148f7998cda856e3f77b0360a3c9c (patch)
tree601b5c17ac69d5f76b17d9f79b92bf7e28ddf957 /Lib/test/test_import.py
parent52cc722ab8857c16173585532c24fbf1c40039ae (diff)
downloadcpython-68f4247b656148f7998cda856e3f77b0360a3c9c.zip
cpython-68f4247b656148f7998cda856e3f77b0360a3c9c.tar.gz
cpython-68f4247b656148f7998cda856e3f77b0360a3c9c.tar.bz2
Issue #15338: skip test_UNC_path when the current user doesn't have enough permissions to access the path.
Diffstat (limited to 'Lib/test/test_import.py')
-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 48443ea..cfed142 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -461,6 +461,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')