[Python-checkins] cpython (3.2): Issue #15338: skip test_UNC_path when the current user doesn't have enough
antoine.pitrou
python-checkins at python.org
Fri Jul 13 21:01:23 CEST 2012
http://hg.python.org/cpython/rev/4d480a2a6296
changeset: 78080:4d480a2a6296
branch: 3.2
parent: 78069:a8aa77458e12
user: Antoine Pitrou <solipsis at pitrou.net>
date: Fri Jul 13 20:54:42 2012 +0200
summary:
Issue #15338: skip test_UNC_path when the current user doesn't have enough permissions to access the path.
files:
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
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -461,6 +461,13 @@
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')
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list