diff options
author | Johan Dahlin <johan@src.gnome.org> | 2005-03-16 13:49:10 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2005-03-16 13:49:10 +0000 |
commit | 33039b3716cd62744af5d11992a9b22bcb45ce32 (patch) | |
tree | d0ad1c0a0edc9eb12ba80f0201ee6313c0842454 /tests/runtests.py | |
parent | 8df9133eb9600278e5be6c9dc5906608c081e129 (diff) | |
download | pygobject-33039b3716cd62744af5d11992a9b22bcb45ce32.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.py | 17 |
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() |