summaryrefslogtreecommitdiff
path: root/tests/runtests.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2005-03-16 13:49:10 +0000
committerJohan Dahlin <johan@src.gnome.org>2005-03-16 13:49:10 +0000
commit90ab043fcd78fff020954868b7111bcc337a1103 (patch)
tree7dda5b99c202b149cd3fe53376ca16e0ca42eb3c /tests/runtests.py
parent7abfa780bdc2adb0253e529ad1ae8efb4be8fd2a (diff)
downloadpygtk-90ab043fcd78fff020954868b7111bcc337a1103.tar.gz
New test.
* tests/test_radiobutton.py (RadioButtonTest): New test. * tests: Renamed *.py to test_*.py
Diffstat (limited to 'tests/runtests.py')
-rw-r--r--tests/runtests.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index b22ce2b9..f4c9e1f1 100644
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -6,8 +6,19 @@ import unittest
import common
-buildDir = sys.argv[1]
-srcDir = sys.argv[2]
+if len(sys.argv) == 3:
+ buildDir = sys.argv[1]
+ srcDir = sys.argv[2]
+else:
+ if len(sys.argv) == 2:
+ program = sys.argv[1]
+ if program.endswith('.py'):
+ program = program[:-3]
+ else:
+ program = None
+
+ buildDir = '..'
+ srcDir = '.'
common.importModules(buildDir=buildDir,
srcDir=srcDir)
@@ -26,6 +37,8 @@ suite = unittest.TestSuite()
loader = unittest.TestLoader()
for name in gettestnames():
+ if program and program not in name:
+ continue
suite.addTest(loader.loadTestsFromName(name))
testRunner = unittest.TextTestRunner()