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

Method test_readlines

Lib/test/test_urllibnet.py:77–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75 self.assertTrue(open_url.read(), "calling 'read' failed")
76
77 def test_readlines(self):
78 # Test both readline and readlines.
79 with self.urlopen(self.url) as open_url:
80 self.assertIsInstance(open_url.readline(), bytes,
81 "readline did not return a string")
82 self.assertIsInstance(open_url.readlines(), list,
83 "readlines did not return a list")
84
85 def test_info(self):
86 # Test 'info'.

Callers

nothing calls this directly

Calls 4

urlopenMethod · 0.95
assertIsInstanceMethod · 0.80
readlineMethod · 0.45
readlinesMethod · 0.45

Tested by

no test coverage detected