[Python-checkins] cpython (merge 3.4 -> default): Skip nntplib tests when transient errors captured.

berker.peksag python-checkins at python.org
Wed Apr 8 10:24:36 CEST 2015


https://hg.python.org/cpython/rev/162743b7f59b
changeset:   95484:162743b7f59b
parent:      95482:ebf3e6332a44
parent:      95483:2b62f8954566
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Wed Apr 08 11:24:51 2015 +0300
summary:
  Skip nntplib tests when transient errors captured.

files:
  Lib/test/support/__init__.py |  5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -13,6 +13,7 @@
 import importlib
 import importlib.util
 import logging.handlers
+import nntplib
 import os
 import platform
 import re
@@ -1341,6 +1342,10 @@
         if timeout is not None:
             socket.setdefaulttimeout(timeout)
         yield
+    except nntplib.NNTPTemporaryError as err:
+        if verbose:
+            sys.stderr.write(denied.args[0] + "\n")
+        raise denied from err
     except OSError as err:
         # urllib can wrap original socket errors multiple times (!), we must
         # unwrap to get at the original error.

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list