From 2815bf5b1f39b9f677135473392887a8d261fc97 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 15 Apr 2019 18:45:01 +0200 Subject: [PATCH] bpo-36348: test_imaplib: add debug info (GH-12846) Log more info if tests fail. --- Lib/test/test_imaplib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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): -- 2.47.3