Skip to content

Commit 5bccca5

Browse files
authored
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.
1 parent e65fcde commit 5bccca5

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
@@ -965,13 +965,19 @@ def test_logincapa(self):
965965
_server = self.imap_class(self.host, self.port)
966966
self.check_logincapa(_server)
967967

968+
@unittest.skipIf(True,
969+
"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
970+
"our randomly generated client x509 certificate anymore")
968971
def test_logincapa_with_client_certfile(self):
969972
with transient_internet(self.host):
970973
with support.check_warnings(('', DeprecationWarning)):
971974
_server = self.imap_class(self.host, self.port,
972975
certfile=CERTFILE)
973976
self.check_logincapa(_server)
974977

978+
@unittest.skipIf(True,
979+
"bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
980+
"our randomly generated client x509 certificate anymore")
975981
def test_logincapa_with_client_ssl_context(self):
976982
with transient_internet(self.host):
977983
_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(f"{cls} got EOF error on connecting "
294+
f"to {cls.NNTP_HOST!r}")
290295

291296
@classmethod
292297
def tearDownClass(cls):

0 commit comments

Comments
 (0)