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

Method test_line_termination

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

Source from the content-addressed store, hash-verified

840
841 @threading_helper.reap_threads
842 def test_line_termination(self):
843
844 class BadNewlineHandler(SimpleIMAPHandler):
845
846 def cmd_CAPABILITY(self, tag, args):
847 self._send(b'* CAPABILITY IMAP4rev1 AUTH\n')
848 self._send_tagged(tag, 'OK', 'CAPABILITY completed')
849
850 with self.reaped_server(BadNewlineHandler) as server:
851 self.assertRaises(imaplib.IMAP4.abort,
852 self.imap_class, *server.server_address)
853
854 class UTF8Server(SimpleIMAPHandler):
855 capabilities = 'AUTH ENABLE UTF8=ACCEPT'

Callers

nothing calls this directly

Calls 2

reaped_serverMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected