File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -902,16 +902,18 @@ def handle(self):
902902 self .imap_class , * server .server_address )
903903
904904 def test_truncated_large_literal (self ):
905+ size = 0
905906 class BadHandler (SimpleIMAPHandler ):
906907 def handle (self ):
907908 self ._send_textline ('* OK {%d}' % size )
908909 self ._send_textline ('IMAP4rev1' )
909910
910911 for exponent in range (15 , 64 ):
911912 size = 1 << exponent
912- with self .reaped_server (BadHandler ) as server :
913- with self .assertRaises (imaplib .IMAP4 .abort ):
914- self .imap_class (* server .server_address )
913+ with self .subTest (f"size=2e{ size } " ):
914+ with self .reaped_server (BadHandler ) as server :
915+ with self .assertRaises (imaplib .IMAP4 .abort ):
916+ self .imap_class (* server .server_address )
915917
916918 @threading_helper .reap_threads
917919 def test_simple_with_statement (self ):
You can’t perform that action at this time.
0 commit comments