MCPcopy Create free account
hub / github.com/GStreamer/gst-python / gcverify

Method gcverify

testsuite/common.py:64–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 return ret
63
64 def gcverify(self):
65 leaked = []
66 for obj in gc.get_objects():
67 if not isinstance(obj, self._tracked_types) or \
68 obj in self._tracked:
69 continue
70
71 leaked.append(obj)
72
73 # we collect again here to get rid of temporary objects created in the
74 # above loop
75 self.gccollect()
76
77 for elt in leaked:
78 print(elt)
79 for i in gc.get_referrers(elt):
80 print(" ", i)
81
82 self.assertFalse(leaked, leaked)
83 del self._tracked
84
85 def setUp(self):
86 self._num_failures = len(getattr(self._result, 'failures', []))

Callers 5

tearDownMethod · 0.95
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80

Calls 1

gccollectMethod · 0.95

Tested by 4

tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64