gstreamer/testsuite/runtests.py
Johan Dahlin 290df83671 testsuite/runtests.py (gettestnames): Cleanup
Original commit message from CVS:
* testsuite/runtests.py (gettestnames): Cleanup

* testsuite/element.py (FakeSinkTest): Enable again and disable
stderr while changing state to ready
(ElementName.testElementStateGetName): New function to test
gst.element_state_get_name.

* testsuite/common.py (path): Don't import ltihooks and proper
check for gst module. Add --gst-debug-no-color as a global option
(disable_stderr, enable_stderr): New functions to disable stdout
called from non python
2004-05-01 15:35:32 +00:00

21 lines
455 B
Python

#!/usr/bin/env python
import glob
import sys
import unittest
SKIP_FILES = ['common', 'runtests']
def gettestnames():
files = glob.glob('*.py')
names = map(lambda x: x[:-3], files)
map(names.remove, SKIP_FILES)
return names
suite = unittest.TestSuite()
loader = unittest.TestLoader()
for name in gettestnames():
suite.addTest(loader.loadTestsFromName(name))
testRunner = unittest.TextTestRunner()
testRunner.run(suite)