diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-13 18:54:42 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-13 18:54:42 (GMT) |
commit | 68f4247b656148f7998cda856e3f77b0360a3c9c (patch) | |
tree | 601b5c17ac69d5f76b17d9f79b92bf7e28ddf957 | |
parent | 52cc722ab8857c16173585532c24fbf1c40039ae (diff) | |
download | cpython-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.
-rw-r--r-- | Lib/test/test_import.py | 7 |
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') |