]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix skipping test_UNC_path on AppVeyor due to a different error being raised (#1920)
authorSegev Finer <segev208@gmail.com>
Fri, 2 Jun 2017 16:28:16 +0000 (19:28 +0300)
committerSteve Dower <steve.dower@microsoft.com>
Fri, 2 Jun 2017 16:28:16 +0000 (09:28 -0700)
We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).

Lib/test/test_import/__init__.py

index be17d6b7743f61c157ec657fb569ce2509c9afc5..a78fae12d8f5aff0c32626f0a3eac323c0983725 100644 (file)
@@ -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