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

Method tearDown

testsuite/old/test_ghostpad.py:72–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 gst.info("end of SetUp")
71
72 def tearDown(self):
73 gst.info("tearDown")
74 self.assertTrue (self.pipeline.__gstrefcount__ >= 1 and self.pipeline.__gstrefcount__ <= 2)
75 self.assertEquals(sys.getrefcount(self.pipeline), pygobject_2_13 and 2 or 3)
76 self.assertEquals(self.src.__gstrefcount__, 2)
77 self.assertEquals(sys.getrefcount(self.src), pygobject_2_13 and 2 or 3)
78 self.assertEquals(self.sink.__gstrefcount__, 2)
79 self.assertEquals(sys.getrefcount(self.sink), 3)
80 gst.debug('deleting pipeline')
81 del self.pipeline
82 self.gccollect()
83
84 self.assertEquals(self.src.__gstrefcount__, 1) # parent gone
85 self.assertEquals(self.sink.__gstrefcount__, 1) # parent gone
86 self.assertEquals(sys.getrefcount(self.src), pygobject_2_13 and 2 or 3)
87 self.assertEquals(sys.getrefcount(self.sink), pygobject_2_13 and 2 or 3)
88 gst.debug('deleting src')
89 del self.src
90 self.gccollect()
91 gst.debug('deleting sink')
92 del self.sink
93 self.gccollect()
94
95 TestCase.tearDown(self)
96
97 def testBinState(self):
98 self.pipeline.add(self.src, self.sink)

Callers

nothing calls this directly

Calls 1

gccollectMethod · 0.80

Tested by

no test coverage detected