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

Method test_iteration

Lib/test/test_urllib2_localnet.py:647–652  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

645
646
647 def test_iteration(self):
648 expected_response = b"pycon 2008..."
649 handler = self.start_server([(200, [], expected_response)])
650 data = urllib.request.urlopen("http://localhost:%s" % handler.port)
651 for line in data:
652 self.assertEqual(line, expected_response)
653
654
655 def test_line_iteration(self):

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected