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

Method _verify_readline

Lib/test/test_httplib.py:1650–1662  ·  view source on GitHub ↗
(self, readline, expected, limit=5)

Source from the content-addressed store, hash-verified

1648 self._verify_readline(self.resp.readline, self.lines_expected, limit=-1)
1649
1650 def _verify_readline(self, readline, expected, limit=5):
1651 all = []
1652 while True:
1653 # short readlines
1654 line = readline(limit)
1655 if line and line != b"foo":
1656 if len(line) < 5:
1657 self.assertEndsWith(line, b"\n")
1658 all.append(line)
1659 if not line:
1660 break
1661 self.assertEqual(b"".join(all), expected)
1662 self.assertTrue(self.resp.isclosed())
1663
1664 def test_read1(self):
1665 resp = self.resp

Callers 3

test_readlineMethod · 0.95
test_read1Method · 0.95

Calls 7

lenFunction · 0.85
assertTrueMethod · 0.80
isclosedMethod · 0.80
assertEndsWithMethod · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected