[Python-checkins] cpython: Issue #28022: Catch another deprecation warning in imaplib

christian.heimes python-checkins at python.org
Sun Sep 11 16:47:09 EDT 2016


https://hg.python.org/cpython/rev/57e88d1159fc
changeset:   103656:57e88d1159fc
user:        Christian Heimes <christian at python.org>
date:        Sun Sep 11 22:47:02 2016 +0200
summary:
  Issue #28022: Catch another deprecation warning in imaplib

files:
  Lib/test/test_imaplib.py |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -638,8 +638,10 @@
 
     def test_logincapa_with_client_certfile(self):
         with transient_internet(self.host):
-            _server = self.imap_class(self.host, self.port, certfile=CERTFILE)
-            self.check_logincapa(_server)
+            with support.check_warnings(('', DeprecationWarning)):
+                _server = self.imap_class(self.host, self.port,
+                                          certfile=CERTFILE)
+                self.check_logincapa(_server)
 
     def test_logincapa_with_client_ssl_context(self):
         with transient_internet(self.host):

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


More information about the Python-checkins mailing list