From: Zachary Ware Date: Sun, 4 Jun 2017 22:19:32 +0000 (-0500) Subject: [3.5] Fix skipping test_UNC_path on AppVeyor due to a different error being raised... X-Git-Tag: v3.5.4rc1~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6636e22002dbfd871b8bda617ca46512f5226b36;p=python [3.5] Fix skipping test_UNC_path on AppVeyor due to a different error being raised (GH-1920) We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to ENOENT (2). (cherry picked from commit 7a99625e0d95cd88ed8842d8677b5beea1fde5ae) --- diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 1e33274b87..5d8b5621a3 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -555,7 +555,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