MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_long_lines

Method test_long_lines

Lib/test/test_email/test_email.py:3963–3976  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3961
3962 @unittest.expectedFailure # TODO: RUSTPYTHON
3963 def test_long_lines(self):
3964 # Expected peak memory use on 32-bit platform: 6*N*M bytes.
3965 M, N = 1000, 20000
3966 m = self.parse(['a:b\n\n'] + ['x'*M] * N)
3967 self.assertEqual(m.items(), [('a', 'b')])
3968 self.assertEqual(m.get_payload(), 'x'*M*N)
3969 m = self.parse(['a:b\r\r'] + ['x'*M] * N)
3970 self.assertEqual(m.items(), [('a', 'b')])
3971 self.assertEqual(m.get_payload(), 'x'*M*N)
3972 m = self.parse(['a:b\r\r'] + ['x'*M+'\x85'] * N)
3973 self.assertEqual(m.items(), [('a', 'b')])
3974 self.assertEqual(m.get_payload(), ('x'*M+'\x85')*N)
3975 m = self.parse(['a:\r', 'b: '] + ['x'*M] * N)
3976 self.assertEqual(m.items(), [('a', ''), ('b', 'x'*M*N)])
3977
3978
3979class TestParsers(TestEmailBase):

Callers

nothing calls this directly

Calls 4

parseMethod · 0.95
get_payloadMethod · 0.80
assertEqualMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected