(self)
| 1869 | self.check_sendall_interrupted(True) |
| 1870 | |
| 1871 | def test_dealloc_warn(self): |
| 1872 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 1873 | r = repr(sock) |
| 1874 | with self.assertWarns(ResourceWarning) as cm: |
| 1875 | sock = None |
| 1876 | support.gc_collect() |
| 1877 | self.assertIn(r, str(cm.warning.args[0])) |
| 1878 | # An open socket file object gets dereferenced after the socket |
| 1879 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 1880 | f = sock.makefile('rb') |
| 1881 | r = repr(sock) |
| 1882 | sock = None |
| 1883 | support.gc_collect() |
| 1884 | with self.assertWarns(ResourceWarning): |
| 1885 | f = None |
| 1886 | support.gc_collect() |
| 1887 | |
| 1888 | def test_name_closed_socketio(self): |
| 1889 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: |
nothing calls this directly
no test coverage detected