From: Segev Finer Date: Fri, 2 Jun 2017 16:28:16 +0000 (+0300) Subject: Fix skipping test_UNC_path on AppVeyor due to a different error being raised (#1920) X-Git-Tag: v3.7.0a1~698 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a99625e0d95cd88ed8842d8677b5beea1fde5ae;p=thirdparty%2FPython%2Fcpython.git Fix skipping test_UNC_path on AppVeyor due to a different error being raised (#1920) We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to ENOENT (2). --- diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index be17d6b7743f..a78fae12d8f5 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -597,7 +597,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