Skip to content

Commit

Permalink
Test issue #37: Show refgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyifei1999 committed Oct 19, 2023
1 parent 81e55de commit 1c87b1e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions guppy/heapy/test/test_RefPat.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,22 @@ def test_pp(dst, src, result=None, **kwds):
write(rp.more)
write(rp.more.more)

print(rp.relimg)
print(__import__('inspect').getsource(rp.relimg))

print(rp.View.root)
for i, x in enumerate(rp.View.norefer):
print(i, x)
print(list(rp.View.rg))
for i, (x, y) in enumerate(rp.View.rg):
print(i, x, y)
print(rp[10].referrers)
for i, x in enumerate(rp.View.norefer):
print(i, x)
print(list(rp.View.rg))
for i, (x, y) in enumerate(rp.View.rg):
print(i, x, y)

self.aseq(output.getvalue(), """\
Reference Pattern by <[dict of] class>.
0: _ --- [-] 1 list: <address>*0
Expand Down

0 comments on commit 1c87b1e

Please sign in to comment.