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

Method _make_body

Lib/test/test_httplib.py:489–498  ·  view source on GitHub ↗
(self, empty_lines=False)

Source from the content-addressed store, hash-verified

487 self.assertEqual(body, b"0\r\n\r\n")
488
489 def _make_body(self, empty_lines=False):
490 lines = self.expected_body.split(b' ')
491 for idx, line in enumerate(lines):
492 # for testing handling empty lines
493 if empty_lines and idx % 2:
494 yield b''
495 if idx < len(lines) - 1:
496 yield line + b' '
497 else:
498 yield line
499
500 def _parse_request(self, data):
501 lines = data.split(b'\r\n')

Callers 3

test_explicit_headersMethod · 0.95
test_requestMethod · 0.95

Calls 3

enumerateFunction · 0.85
lenFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected