(self)
| 653 | |
| 654 | |
| 655 | def test_line_iteration(self): |
| 656 | lines = [b"We\n", b"got\n", b"here\n", b"verylong " * 8192 + b"\n"] |
| 657 | expected_response = b"".join(lines) |
| 658 | handler = self.start_server([(200, [], expected_response)]) |
| 659 | data = urllib.request.urlopen("http://localhost:%s" % handler.port) |
| 660 | for index, line in enumerate(data): |
| 661 | self.assertEqual(line, lines[index], |
| 662 | "Fetched line number %s doesn't match expected:\n" |
| 663 | " Expected length was %s, got %s" % |
| 664 | (index, len(lines[index]), len(line))) |
| 665 | self.assertEqual(index + 1, len(lines)) |
| 666 | |
| 667 | |
| 668 | def test_issue16464(self): |
nothing calls this directly
no test coverage detected