(self)
| 953 | self.assertEqual(repr(s), expected) |
| 954 | |
| 955 | def test_weakref(self): |
| 956 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: |
| 957 | p = proxy(s) |
| 958 | self.assertEqual(p.fileno(), s.fileno()) |
| 959 | s = None |
| 960 | support.gc_collect() # For PyPy or other GCs. |
| 961 | try: |
| 962 | p.fileno() |
| 963 | except ReferenceError: |
| 964 | pass |
| 965 | else: |
| 966 | self.fail('Socket proxy still exists') |
| 967 | |
| 968 | def testSocketError(self): |
| 969 | # Testing socket module exceptions |
nothing calls this directly
no test coverage detected