(self)
| 963 | self.assertEqual(repr(s), expected) |
| 964 | |
| 965 | def test_weakref(self): |
| 966 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: |
| 967 | p = proxy(s) |
| 968 | self.assertEqual(p.fileno(), s.fileno()) |
| 969 | s = None |
| 970 | support.gc_collect() # For PyPy or other GCs. |
| 971 | try: |
| 972 | p.fileno() |
| 973 | except ReferenceError: |
| 974 | pass |
| 975 | else: |
| 976 | self.fail('Socket proxy still exists') |
| 977 | |
| 978 | def testSocketError(self): |
| 979 | # Testing socket module exceptions |
nothing calls this directly
no test coverage detected