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

Method test_unusable_closed_socketio

Lib/test/test_socket.py:1894–1903  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1892 self.assertEqual(repr(fp), "<_io.BufferedReader name=-1>")
1893
1894 def test_unusable_closed_socketio(self):
1895 with socket.socket() as sock:
1896 fp = sock.makefile("rb", buffering=0)
1897 self.assertTrue(fp.readable())
1898 self.assertFalse(fp.writable())
1899 self.assertFalse(fp.seekable())
1900 fp.close()
1901 self.assertRaises(ValueError, fp.readable)
1902 self.assertRaises(ValueError, fp.writable)
1903 self.assertRaises(ValueError, fp.seekable)
1904
1905 def test_socket_close(self):
1906 sock = socket.socket()

Callers

nothing calls this directly

Calls 9

socketMethod · 0.80
assertTrueMethod · 0.80
assertFalseMethod · 0.80
makefileMethod · 0.45
readableMethod · 0.45
writableMethod · 0.45
seekableMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected