~ubuntu-branches/ubuntu/precise/gst0.10-python/precise

« back to all changes in this revision

Viewing changes to testsuite/test_interface.py

  • Committer: Bazaar Package Importer
  • Author(s): Loic Minier
  • Date: 2006-06-25 19:37:45 UTC
  • Revision ID: james.westby@ubuntu.com-20060625193745-9yeg0wq56r24n57x
Tags: upstream-0.10.4
ImportĀ upstreamĀ versionĀ 0.10.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Python -*-
 
2
# vi:si:et:sw=4:sts=4:ts=4
 
3
#
 
4
# gst-python - Python bindings for GStreamer
 
5
# Copyright (C) 2002 David I. Lehn
 
6
# Copyright (C) 2004 Johan Dahlin
 
7
# Copyright (C) 2005 Edward Hervey
 
8
#
 
9
# This library is free software; you can redistribute it and/or
 
10
# modify it under the terms of the GNU Lesser General Public
 
11
# License as published by the Free Software Foundation; either
 
12
# version 2.1 of the License, or (at your option) any later version.
 
13
#
 
14
# This library is distributed in the hope that it will be useful,
 
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
# Lesser General Public License for more details.
 
18
#
 
19
# You should have received a copy of the GNU Lesser General Public
 
20
# License along with this library; if not, write to the Free Software
 
21
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
22
 
 
23
from common import gst, unittest, TestCase
 
24
 
 
25
import gobject
 
26
 
 
27
class Availability(TestCase):
 
28
    def testXOverlay(self):
 
29
        assert hasattr(gst.interfaces, 'XOverlay')
 
30
        assert issubclass(gst.interfaces.XOverlay, gobject.GInterface)
 
31
 
 
32
    def testMixer(self):
 
33
        assert hasattr(gst.interfaces, 'Mixer')
 
34
        assert issubclass(gst.interfaces.Mixer, gobject.GInterface)
 
35
 
 
36
class FunctionCall(TestCase):
 
37
    def FIXME_testXOverlay(self):
 
38
        # obviously a testsuite is not allowed to instantiate this
 
39
        # since it needs a running X or will fail.  find some way to
 
40
        # deal with that.
 
41
        element = gst.element_factory_make('xvimagesink')
 
42
        assert isinstance(element, gst.Element)
 
43
        assert isinstance(element, gst.interfaces.XOverlay)
 
44
        element.set_xwindow_id(0L)
 
45
        
 
46
if __name__ == "__main__":
 
47
    unittest.main()