cpython: 7eac87fa7a06 (original) (raw)
Mercurial > cpython
changeset 78083:7eac87fa7a06 2.7
Issue #15338: skip test_UNC_path when the current user doesn't have enough permissions to access the path. [#15338]
Antoine Pitrou solipsis@pitrou.net | |
---|---|
date | Fri, 13 Jul 2012 20:54:42 +0200 |
parents | 93df82c18781 |
children | 9bbc4900301c |
files | Lib/test/test_import.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_import.py 7 |
line wrap: on
line diff
--- 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:[](#l1.7)
os.listdir(unc)[](#l1.8)
except OSError as e:[](#l1.9)
if e.errno in (errno.EPERM, errno.EACCES):[](#l1.10)
# See issue #15338[](#l1.11)
self.skipTest("cannot access administrative share %r" % (unc,))[](#l1.12)
raise[](#l1.13) sys.path.append(path)[](#l1.14) mod = __import__("test_trailing_slash")[](#l1.15) self.assertEqual(mod.testdata, 'test_trailing_slash')[](#l1.16)