From: Victor Stinner Date: Mon, 15 Apr 2019 16:45:01 +0000 (+0200) Subject: bpo-36348: test_imaplib: add debug info (GH-12846) X-Git-Tag: v3.7.4rc1~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2815bf5b1f39b9f677135473392887a8d261fc97;p=thirdparty%2FPython%2Fcpython.git bpo-36348: test_imaplib: add debug info (GH-12846) Log more info if tests fail. --- diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index aec36af6c525..9305e47ee993 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -470,8 +470,8 @@ class NewIMAPTestsMixin(): self.assertEqual(typ, 'OK') self.assertEqual(data[0], b'LOGIN completed') typ, data = client.logout() - self.assertEqual(typ, 'BYE') - self.assertEqual(data[0], b'IMAP4ref1 Server logging out') + self.assertEqual(typ, 'BYE', (typ, data)) + self.assertEqual(data[0], b'IMAP4ref1 Server logging out', (typ, data)) self.assertEqual(client.state, 'LOGOUT') def test_lsub(self): @@ -937,7 +937,7 @@ class RemoteIMAPTest(unittest.TestCase): with transient_internet(self.host): rs = self.server.logout() self.server = None - self.assertEqual(rs[0], 'BYE') + self.assertEqual(rs[0], 'BYE', rs) @unittest.skipUnless(ssl, "SSL not available") @@ -995,7 +995,7 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest): with transient_internet(self.host): _server = self.imap_class(self.host, self.port) rs = _server.logout() - self.assertEqual(rs[0], 'BYE') + self.assertEqual(rs[0], 'BYE', rs) def test_ssl_context_certfile_exclusive(self): with transient_internet(self.host):