Skip to content
Myr

test iter_lines

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 4751048 · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−0 removed

  • other:+11 added−0 removed

1 file+11 added−0 removed

modified:test_requests.py+11 added
590 unmodified lines
591 r2 = requests.get(httpbin('get'), prefetch=True)592 assert r2._content593 assert r2.content594595 def test_iter_lines(self):596597 lines = (0, 2, 10, 100)598599 for i in lines:600601 r = requests.get(httpbin('stream', str(i)), prefetch=False)602 len_lines = len([l for l in r.iter_lines()])603604 self.assertEqual(i, len_lines)605606if __name__ == '__main__':607 unittest.main()