]> granicus.if.org Git - python/commitdiff
[3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised...
authorZachary Ware <zachary.ware@gmail.com>
Sun, 4 Jun 2017 22:14:03 +0000 (17:14 -0500)
committerGitHub <noreply@github.com>
Sun, 4 Jun 2017 22:14:03 +0000 (17:14 -0500)
We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).
(cherry picked from commit 7a99625e0d95cd88ed8842d8677b5beea1fde5ae)

Lib/test/test_import/__init__.py

index 760908efe671fe9bb84d4c4da99e0c3d1d9eeb5d..4aca9e597cf9f9a4f4760a0b748caa1d51c9f839 100644 (file)
@@ -567,7 +567,7 @@ class PathsTests(unittest.TestCase):
         try:
             os.listdir(unc)
         except OSError as e:
-            if e.errno in (errno.EPERM, errno.EACCES):
+            if e.errno in (errno.EPERM, errno.EACCES, errno.ENOENT):
                 # See issue #15338
                 self.skipTest("cannot access administrative share %r" % (unc,))
             raise