mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
gst/gst.defs: gst.Bin constructor can take no arguments
Original commit message from CVS: * gst/gst.defs: gst.Bin constructor can take no arguments * testsuite/test_bin.py: add constructor tests * testsuite/test_element.py: add same link test with no pads
This commit is contained in:
parent
2dc54c0954
commit
e6830e1e57
4 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-10-05 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gst.defs:
|
||||
gst.Bin constructor can take no arguments
|
||||
* testsuite/test_bin.py:
|
||||
add constructor tests
|
||||
* testsuite/test_element.py:
|
||||
add same link test with no pads
|
||||
|
||||
2005-10-05 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gst-types.defs:
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
(is-constructor-of "GstBin")
|
||||
(return-type "GstElement*")
|
||||
(parameters
|
||||
'("const-gchar*" "name")
|
||||
'("const-gchar*" "name" (null-ok) (default "NULL"))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -164,5 +164,16 @@ class Preroll(TestCase):
|
|||
self.bin.set_state(gst.STATE_NULL)
|
||||
self.bin.get_state(timeout=None)
|
||||
|
||||
class ConstructorTest(TestCase):
|
||||
def testGood(self):
|
||||
bin = gst.Bin()
|
||||
bin = gst.Bin(None)
|
||||
bin = gst.Bin('')
|
||||
bin = gst.Bin('myname')
|
||||
|
||||
def testBad(self):
|
||||
self.assertRaises(TypeError, gst.Bin, 0)
|
||||
self.assertRaises(TypeError, gst.Bin, gst.Bin())
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
@ -222,5 +222,11 @@ class DebugTest(TestCase):
|
|||
e.set_property("name", "testelement")
|
||||
e.break_it_down()
|
||||
|
||||
class LinkNoPadsTest(TestCase):
|
||||
def testLinkNoPads(self):
|
||||
src = gst.Bin()
|
||||
sink = gst.Bin()
|
||||
self.assertRaises(gst.LinkError, src.link, sink)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue