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

Method test_refcycle

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

Source from the content-addressed store, hash-verified

629
630 @support.cpython_only
631 def test_refcycle(self):
632 # Issue #7943: an SSL object doesn't create reference cycles with
633 # itself.
634 s = socket.socket(socket.AF_INET)
635 ss = test_wrap_socket(s)
636 wr = weakref.ref(ss)
637 with warnings_helper.check_warnings(("", ResourceWarning)):
638 del ss
639 self.assertEqual(wr(), None)
640
641 def test_wrapped_unconnected(self):
642 # 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