summaryrefslogtreecommitdiffstats
path: root/tests/runtests.py
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@src.gnome.org>2004-07-10 16:56:36 +0000
committerJohan Dahlin <jdahlin@src.gnome.org>2004-07-10 16:56:36 +0000
commit8238d9cc0fce600328f50efa139db1f575058ae8 (patch)
tree945ced41b87cdff3fd2ac2cb34b84d96f54ae2db /tests/runtests.py
parentd47520065b91d4f2b9f7e4a53faf008adc780113 (diff)
downloadpygobject-8238d9cc0fce600328f50efa139db1f575058ae8.tar.gz
pygobject-8238d9cc0fce600328f50efa139db1f575058ae8.tar.xz
pygobject-8238d9cc0fce600328f50efa139db1f575058ae8.zip
New script to run all tests in one take
* tests/runtests.py: New script to run all tests in one take * tests/Makefile.am: autotoolify * tests/signal.py: New simple test taken from examples/gobject/signal.py
Diffstat (limited to 'tests/runtests.py')
-rw-r--r--tests/runtests.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
new file mode 100644
index 0000000..f3559f5
--- /dev/null
+++ b/tests/runtests.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+import glob
+import os
+import sys
+import unittest
+
+SKIP_FILES = ['runtests']
+
+dir = os.path.split(os.path.abspath(__file__))[0]
+os.chdir(dir)
+
+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)