[Python-checkins] cpython (3.4): 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/2b62f8954566
changeset: 95483:2b62f8954566
branch: 3.4
parent: 95478:eca51493c770
user: Berker Peksag <berker.peksag at gmail.com>
date: Wed Apr 08 11:24:27 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
@@ -1340,6 +1341,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