MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_refcycle

Method test_refcycle

Lib/test/test_ssl.py:550–558  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

548
549 @support.cpython_only
550 def test_refcycle(self):
551 # Issue #7943: an SSL object doesn't create reference cycles with
552 # itself.
553 s = socket.socket(socket.AF_INET)
554 ss = test_wrap_socket(s)
555 wr = weakref.ref(ss)
556 with warnings_helper.check_warnings(("", ResourceWarning)):
557 del ss
558 self.assertEqual(wr(), None)
559
560 def test_wrapped_unconnected(self):
561 # Methods on an unconnected SSLSocket propagate the original

Callers

nothing calls this directly

Calls 3

test_wrap_socketFunction · 0.85
socketMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected