start a message test

Original commit message from CVS:
start a message test
This commit is contained in:
Thomas Vander Stichele 2005-10-07 07:48:09 +00:00
parent c363ad6052
commit 48057a6d7c
3 changed files with 39 additions and 0 deletions

View file

@ -25,6 +25,7 @@ TESTS = \
test_event.py \
test_ghostpad.py \
test_interface.py \
test_message.py \
test_pad.py \
test_pipeline.py \
test_registry.py \

View file

@ -154,6 +154,12 @@ class BufferTest(unittest.TestCase):
buffer.offset_end = 2**64 - 1
assert buffer.offset_end == 2**64 - 1
def testBufferCaps(self):
buffer = gst.Buffer()
caps = gst.caps_from_string('foo/blah')
buffer.set_caps(caps)
c = buffer.get_caps()
self.assertEquals(caps, c)
if __name__ == "__main__":
unittest.main()

32
testsuite/test_message.py Normal file
View file

@ -0,0 +1,32 @@
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# gst-python - Python bindings for GStreamer
# Copyright (C) 2005 Thomas Vander Stichele
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import sys
from common import gobject, gst, unittest, TestCase
import gc
class NewTest(unittest.TestCase):
def testEOS(self):
b = gst.Bin()
m = gst.message_new_eos(b)
while gc.collect(): pass
if __name__ == "__main__":
unittest.main()