Skip to content

Commit 2815bf5

Browse files
authored
bpo-36348: test_imaplib: add debug info (GH-12846)
Log more info if tests fail.
1 parent 871ba6c commit 2815bf5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_imaplib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ def test_logout(self):
470470
self.assertEqual(typ, 'OK')
471471
self.assertEqual(data[0], b'LOGIN completed')
472472
typ, data = client.logout()
473-
self.assertEqual(typ, 'BYE')
474-
self.assertEqual(data[0], b'IMAP4ref1 Server logging out')
473+
self.assertEqual(typ, 'BYE', (typ, data))
474+
self.assertEqual(data[0], b'IMAP4ref1 Server logging out', (typ, data))
475475
self.assertEqual(client.state, 'LOGOUT')
476476

477477
def test_lsub(self):
@@ -937,7 +937,7 @@ def test_logout(self):
937937
with transient_internet(self.host):
938938
rs = self.server.logout()
939939
self.server = None
940-
self.assertEqual(rs[0], 'BYE')
940+
self.assertEqual(rs[0], 'BYE', rs)
941941

942942

943943
@unittest.skipUnless(ssl, "SSL not available")
@@ -995,7 +995,7 @@ def test_logout(self):
995995
with transient_internet(self.host):
996996
_server = self.imap_class(self.host, self.port)
997997
rs = _server.logout()
998-
self.assertEqual(rs[0], 'BYE')
998+
self.assertEqual(rs[0], 'BYE', rs)
999999

10001000
def test_ssl_context_certfile_exclusive(self):
10011001
with transient_internet(self.host):

0 commit comments

Comments
 (0)