3
# vi:si:et:sw=4:sts=4:ts=4
5
# gst-python - Python bindings for GStreamer
6
# Copyright (C) 2002 David I. Lehn
7
# Copyright (C) 2004 Johan Dahlin
8
# Copyright (C) 2005 Edward Hervey
10
# This library is free software; you can redistribute it and/or
11
# modify it under the terms of the GNU Lesser General Public
12
# License as published by the Free Software Foundation; either
13
# version 2.1 of the License, or (at your option) any later version.
15
# This library is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
# Lesser General Public License for more details.
20
# You should have received a copy of the GNU Lesser General Public
21
# License along with this library; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
SKIP_FILES = ['common', 'runtests']
31
def gettestnames(which):
33
dir = os.path.split(os.path.abspath(__file__))[0]
34
which = [os.path.basename(p) for p in glob.glob('%s/*.py' % dir)]
36
names = map(lambda x: x[:-3], which)
42
suite = unittest.TestSuite()
43
loader = unittest.TestLoader()
45
for name in gettestnames(sys.argv[1:]):
46
suite.addTest(loader.loadTestsFromName(name))
50
if os.environ.has_key('VERBOSE'):
54
testRunner = unittest.TextTestRunner(descriptions=descriptions,
56
result = testRunner.run(suite)
57
if result.failures or result.errors: