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

Method test_read1_bounded

Lib/test/test_httplib.py:1730–1740  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1728 self.assertTrue(resp.isclosed())
1729
1730 def test_read1_bounded(self):
1731 resp = self.resp
1732 all = []
1733 while True:
1734 data = resp.read1(10)
1735 if not data:
1736 break
1737 self.assertLessEqual(len(data), 10)
1738 all.append(data)
1739 self.assertEqual(b"".join(all), self.lines_expected)
1740 self.assertTrue(resp.isclosed())
1741
1742 def test_read1_0(self):
1743 self.assertEqual(self.resp.read1(0), b"")

Callers

nothing calls this directly

Calls 7

assertLessEqualMethod · 0.80
assertTrueMethod · 0.80
isclosedMethod · 0.80
read1Method · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected