ยปCore Development>Code coverage>Lib/test/crashers/underlying_dict.py

Python code coverage for Lib/test/crashers/underlying_dict.py

#countcontent
1n/aimport gc
2n/a
3n/athingy = object()
4n/aclass A(object):
5n/a def f(self):
6n/a return 1
7n/a x = thingy
8n/a
9n/ar = gc.get_referrers(thingy)
10n/aif "__module__" in r[0]:
11n/a dct = r[0]
12n/aelse:
13n/a dct = r[1]
14n/a
15n/aa = A()
16n/afor i in range(10):
17n/a a.f()
18n/adct["f"] = lambda self: 2
19n/a
20n/aprint(a.f()) # should print 1