summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_nntplib.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-04-27 15:30:13 (GMT)
committerGitHub <noreply@github.com>2017-04-27 15:30:13 (GMT)
commit5bccca58b9b2b3a925b16750bedbd907695ea8d7 (patch)
tree5808d758801ae24109ccd9ccc2aca1ec5bc29956 /Lib/test/test_nntplib.py
parente65fcde85abf6617508f2d6b77020e24b8ca6f6b (diff)
downloadcpython-5bccca58b9b2b3a925b16750bedbd907695ea8d7.zip
cpython-5bccca58b9b2b3a925b16750bedbd907695ea8d7.tar.gz
cpython-5bccca58b9b2b3a925b16750bedbd907695ea8d7.tar.bz2
bpo-30175: Skip client cert tests of test_imaplib (#1320)
* bpo-30175: Skip client cert tests of test_imaplib The IMAP server cyrus.andrew.cmu.edu doesn't accept our randomly generated client x509 certificate anymore. * bpo-30188: Catch EOFError in NetworkedNNTPTests test_nntplib fails randomly with EOFError in NetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in that case.
Diffstat (limited to 'Lib/test/test_nntplib.py')
-rw-r--r--Lib/test/test_nntplib.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
index c46ded1..3e84f34 100644
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -286,7 +286,12 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase):
def setUpClass(cls):
support.requires("network")
with support.transient_internet(cls.NNTP_HOST):
- cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False)
+ try:
+ cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT,
+ usenetrc=False)
+ except EOFError:
+ raise unittest.SkipTest(f"{cls} got EOF error on connecting "
+ f"to {cls.NNTP_HOST!r}")
@classmethod
def tearDownClass(cls):