summaryrefslogtreecommitdiff
path: root/testsuite/test_bin.py
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2005-10-13 15:56:16 +0000
committerEdward Hervey <bilboed@bilboed.com>2005-10-13 15:56:16 +0000
commit03f65e4179abbdc41608e3acbb64d58857beb6f4 (patch)
tree9d896e394050fcdbe9fc6ad2e89e7d324524cc2b /testsuite/test_bin.py
parentc72f87b6822d8949e4713c2f1c860d5e733d72d0 (diff)
gst/: Updated to new API
Original commit message from CVS: * gst/gst-types.defs: * gst/gst.defs: Updated to new API * gst/gstbus.override: bus.add_watch() now uses gst_bus_add_watch_full() using pyg_destroy_notify as the DestroyNotify function, thus enabling proper python garbage collection. * testsuite/common.py: Let's check refcounting of ALL gst.Object * testsuite/test_bin.py: Added debug * testsuite/test_bus.py: Added "message" signal version of test
Diffstat (limited to 'testsuite/test_bin.py')
-rw-r--r--testsuite/test_bin.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/test_bin.py b/testsuite/test_bin.py
index 5dca82f..dc06d55 100644
--- a/testsuite/test_bin.py
+++ b/testsuite/test_bin.py
@@ -105,13 +105,21 @@ class BinAddRemove(TestCase):
TestCase.tearDown(self)
def testError(self):
+ gst.info("creating fakesrc")
src = gst.element_factory_make('fakesrc', 'name')
+ gst.info("creating fakesink")
sink = gst.element_factory_make('fakesink', 'name')
+ gst.info("adding src:%d to bin" % src.__gstrefcount__)
+ self.assertEqual(src.__gstrefcount__, 1)
self.bin.add(src)
+ self.assertEqual(src.__gstrefcount__, 2)
+ gst.info("added src:%d" % src.__gstrefcount__)
self.assertRaises(gst.AddError, self.bin.add, sink)
self.assertRaises(gst.AddError, self.bin.add, src)
self.assertRaises(gst.RemoveError, self.bin.remove, sink)
+ gst.info("removing src")
self.bin.remove(src)
+ gst.info("removed")
self.assertRaises(gst.RemoveError, self.bin.remove, src)
def testMany(self):