gstreamer/testsuite/common.py
Johan Dahlin f203f4826c testsuite/pipeline.py (PipelineConstructor.testGoodConstructor) (PipelineConstructor.testBadConstruct)
Original commit message from CVS:
* testsuite/pipeline.py (PipelineConstructor.testGoodConstructor)
(PipelineConstructor.testBadConstruct)
(ThreadConstructor.testCreate): New tests

* testsuite/element.py (ElementTest.testGoodConstructor): Add
isinstance(element, gst.Element) test

* testsuite/common.py: Clean up, use ltihooks
(init) Assign tp_new for pipeline and thread to PyType_GenericNew
for now.
2004-04-16 13:56:39 +00:00

31 lines
603 B
Python

import dl
import os
import sys
import unittest
# Don't insert before .
sys.path.insert(1, os.path.join('..', 'gst'))
import ltihooks
# Load GST and make sure we load it from the current build
sys.setdlopenflags(dl.RTLD_LAZY | dl.RTLD_GLOBAL)
path = os.path.abspath(os.path.join('..', 'gst'))
import gst
assert gst.__path__ != path, 'bad path'
try:
import gst.interfaces
assert os.path.basename(gst.interfaces.__file__) != path, 'bad path'
except ImportError:
pass
try:
import gst.play
assert os.path.basename(gst.play.__file__) != path, 'bad path'
except ImportError:
pass