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

Method test_fileno

Lib/test/test_urllib.py:143–148  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 "readlines() returned improper text")
142
143 def test_fileno(self):
144 file_num = self.returned_obj.fileno()
145 self.assertIsInstance(file_num, int, "fileno() did not return an int")
146 self.assertEqual(os.read(file_num, len(self.text)), self.text,
147 "Reading on the file descriptor returned by fileno() "
148 "did not return the expected text")
149
150 def test_close(self):
151 # Test close() by calling it here and then having it be called again

Callers

nothing calls this directly

Calls 4

assertIsInstanceMethod · 0.80
filenoMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected