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

Method test_basic_ref

Lib/test/test_weakref.py:108–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106class ReferencesTestCase(TestBase):
107
108 def test_basic_ref(self):
109 self.check_basic_ref(C)
110 self.check_basic_ref(create_function)
111 self.check_basic_ref(create_bound_method)
112
113 # Just make sure the tp_repr handler doesn't raise an exception.
114 # Live reference:
115 o = C()
116 wr = weakref.ref(o)
117 repr(wr)
118 # Dead reference:
119 del o
120 repr(wr)
121
122 @support.cpython_only
123 def test_ref_repr(self):

Callers

nothing calls this directly

Calls 2

check_basic_refMethod · 0.95
CClass · 0.70

Tested by

no test coverage detected