MCPcopy Index your code
hub / github.com/python/cpython / test_linetoolong

Method test_linetoolong

Lib/test/test_imaplib.py:1032–1040  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1030
1031
1032 def test_linetoolong(self):
1033 class TooLongHandler(SimpleIMAPHandler):
1034 def handle(self):
1035 # Send a very long response line
1036 self.wfile.write(b'* OK ' + imaplib._MAXLINE * b'x' + b'\r\n')
1037
1038 with self.reaped_server(TooLongHandler) as server:
1039 self.assertRaises(imaplib.IMAP4.error,
1040 self.imap_class, *server.server_address)
1041
1042 def test_truncated_large_literal(self):
1043 size = 0

Callers

nothing calls this directly

Calls 2

reaped_serverMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected