MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_get_referrers1

Method test_get_referrers1

tests/test_get_referrers.py:22–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20@pytest.mark.skipif(not has_referrers or IS_PYPY, reason="gc.get_referrers not implemented")
21class Test(unittest.TestCase):
22 def test_get_referrers1(self):
23 container = []
24 contained = [1, 2]
25 container.append(0)
26 container.append(contained)
27
28 # Ok, we have the contained in this frame and inside the given list (which on turn is in this frame too).
29 # we should skip temporary references inside the get_referrer_info.
30 result = pydevd_referrers.get_referrer_info(contained)
31 assert "list[1]" in result
32 pydevd_referrers.print_referrers(contained, stream=StringIO())
33
34 def test_get_referrers2(self):
35 class MyClass(object):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected