diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-13 20:54:42 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-13 20:54:42 +0200 |
| commit | 68f4247b656148f7998cda856e3f77b0360a3c9c (patch) | |
| tree | 601b5c17ac69d5f76b17d9f79b92bf7e28ddf957 /Lib/test/test_import.py | |
| parent | 52cc722ab8857c16173585532c24fbf1c40039ae (diff) | |
| download | cpython-git-68f4247b656148f7998cda856e3f77b0360a3c9c.tar.gz | |
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.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 48443ea580..cfed142845 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') |
