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

Method tearDown

testsuite/old/test_pad.py:378–401  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

376 self.assertEquals(sys.getrefcount(self.fakesink), pygobject_2_13 and 2 or 3)
377
378 def tearDown(self):
379 # Refcount must be either 1 or 2, to allow for a possibly still running
380 # state-recalculation thread
381 self.assertTrue (self.pipeline.__gstrefcount__ >= 1 and self.pipeline.__gstrefcount__ <= 2)
382
383 self.assertEquals(sys.getrefcount(self.pipeline), pygobject_2_13 and 2 or 3)
384 self.assertEquals(self.fakesrc.__gstrefcount__, 2)
385 self.assertEquals(sys.getrefcount(self.fakesrc), pygobject_2_13 and 2 or 3)
386 gst.debug('deleting pipeline')
387 del self.pipeline
388 self.gccollect()
389
390 self.assertEquals(self.fakesrc.__gstrefcount__, 1) # parent gone
391 self.assertEquals(self.fakesink.__gstrefcount__, 1) # parent gone
392 self.assertEquals(sys.getrefcount(self.fakesrc), pygobject_2_13 and 2 or 3)
393 self.assertEquals(sys.getrefcount(self.fakesink), pygobject_2_13 and 2 or 3)
394 gst.debug('deleting fakesrc')
395 del self.fakesrc
396 self.gccollect()
397 gst.debug('deleting fakesink')
398 del self.fakesink
399 self.gccollect()
400
401 TestCase.tearDown(self)
402
403 def testFakeSrcProbeOnceKeep(self):
404 self.fakesrc.set_property('num-buffers', 1)

Callers

nothing calls this directly

Calls 2

gccollectMethod · 0.80
tearDownMethod · 0.45

Tested by

no test coverage detected