From 202d62b53e593bfc555b471b0008194abe6b7bfe Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sun, 4 Jun 2017 16:49:24 -0500 Subject: [PATCH 1/2] Skip UNC tests on AppVeyor in case of ENOENT --- Lib/test/test_import.py | 2 +- Lib/test/test_tcl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 9a1fb678c6124c..9b1d2615e9ef64 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -548,7 +548,7 @@ def _test_UNC_path(self): 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 diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 4c2e8d5200c480..c5e875fa50191b 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -256,7 +256,7 @@ def testLoadWithUNC(self): try: p = Popen(cmd, stdout=PIPE, stderr=PIPE) except WindowsError as e: - if e.winerror == 5: + if e.winerror == 5 or e.winerror == 53: self.skipTest('Not permitted to start the child process') else: raise From cce694769a513266f7bf5236caa6556752abac49 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sun, 4 Jun 2017 17:17:28 -0500 Subject: [PATCH 2/2] s/53/2/ --- Lib/test/test_tcl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index c5e875fa50191b..921d094d5a78fe 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -256,7 +256,7 @@ def testLoadWithUNC(self): try: p = Popen(cmd, stdout=PIPE, stderr=PIPE) except WindowsError as e: - if e.winerror == 5 or e.winerror == 53: + if e.winerror == 5 or e.winerror == 2: self.skipTest('Not permitted to start the child process') else: raise