From 48057a6d7cfb544fd4aae3215cc3c4e78510b765 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 7 Oct 2005 07:48:09 +0000 Subject: [PATCH] start a message test Original commit message from CVS: start a message test --- testsuite/Makefile.am | 1 + testsuite/test_buffer.py | 6 ++++++ testsuite/test_message.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 testsuite/test_message.py diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 5a2ee73c28..4fdc70dddd 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -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 \ diff --git a/testsuite/test_buffer.py b/testsuite/test_buffer.py index f8258a21d5..e9cf66d245 100644 --- a/testsuite/test_buffer.py +++ b/testsuite/test_buffer.py @@ -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() diff --git a/testsuite/test_message.py b/testsuite/test_message.py new file mode 100644 index 0000000000..ea232050b3 --- /dev/null +++ b/testsuite/test_message.py @@ -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()