Skip to content

Commit 0eda2d4

Browse files
authored
bpo-30175: Skip client cert tests of test_imaplib (#1320) (#1324)
* 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. (cherry picked from commit 5bccca5)
1 parent c4dfe25 commit 0eda2d4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Lib/test/test_imaplib.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,11 +917,17 @@ def test_logincapa(self):
917917
_server = self.imap_class(self.host, self.port)
918918
self.check_logincapa(_server)
919919

920+
@unittest.skipIf(True,
921+
"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
922+
"our randomly generated client x509 certificate anymore")
920923
def test_logincapa_with_client_certfile(self):
921924
with transient_internet(self.host):
922925
_server = self.imap_class(self.host, self.port, certfile=CERTFILE)
923926
self.check_logincapa(_server)
924927

928+
@unittest.skipIf(True,
929+
"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
930+
"our randomly generated client x509 certificate anymore")
925931
def test_logincapa_with_client_ssl_context(self):
926932
with transient_internet(self.host):
927933
_server = self.imap_class(

Lib/test/test_nntplib.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,12 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase):
286286
def setUpClass(cls):
287287
support.requires("network")
288288
with support.transient_internet(cls.NNTP_HOST):
289-
cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False)
289+
try:
290+
cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT,
291+
usenetrc=False)
292+
except EOFError:
293+
raise unittest.SkipTest("%s got EOF error on connecting "
294+
"to %r" % (cls, cls.NNTP_HOST))
290295

291296
@classmethod
292297
def tearDownClass(cls):

0 commit comments

Comments
 (0)