(self)
| 636 | self.assertEqual(line, expected_response) |
| 637 | |
| 638 | def test_line_iteration(self): |
| 639 | lines = [b"We\n", b"got\n", b"here\n", b"verylong " * 8192 + b"\n"] |
| 640 | expected_response = b"".join(lines) |
| 641 | handler = self.start_server([(200, [], expected_response)]) |
| 642 | data = urllib.request.urlopen("http://localhost:%s" % handler.port) |
| 643 | for index, line in enumerate(data): |
| 644 | self.assertEqual(line, lines[index], |
| 645 | "Fetched line number %s doesn't match expected:\n" |
| 646 | " Expected length was %s, got %s" % |
| 647 | (index, len(lines[index]), len(line))) |
| 648 | self.assertEqual(index + 1, len(lines)) |
| 649 | |
| 650 | def test_issue16464(self): |
| 651 | # See https://bugs.python.org/issue16464 |
nothing calls this directly
no test coverage detected