diff options
author | Richard Darst <rkd@zgib.net> | 2009-09-11 01:26:15 (GMT) |
---|---|---|
committer | Richard Darst <rkd@zgib.net> | 2009-09-11 01:26:15 (GMT) |
commit | e05f5d962ea533e3159167af48a83f98f9cc6178 (patch) | |
tree | 751de0c85325d22feea3db0c5c2d5dfca55e2160 | |
parent | 78d7365a6ebd63268941ffd2ae0a3d9dbb725d41 (diff) |
Make test runner able to run single tests
- Now, test names can be specified on the command line, and only these
tests will be run.
- This is imperfect and doesn't handle all cases, but works for now which
is what matters.
darcs-hash:20090911012615-82ea9-5cf454e2ddcc3cf7d4565856e20ffd1f51c29b33.gz
-rw-r--r-- | tests/run_test.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/run_test.py b/tests/run_test.py index af4d9f5..0a1094a 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -35,15 +35,13 @@ class MeetBotTest(unittest.TestCase): -if __name__ == '__main__': - os.chdir(os.path.join(os.path.dirname(__file__), '.')) - unittest.main() - - - - - - - +if __name__ == '__main__': + if len(sys.argv) <= 1: + os.chdir(os.path.join(os.path.dirname(__file__), '.')) + unittest.main() + else: + for testname in sys.argv[1:]: + print testname + MeetBotTest(methodName='test_'+testname).debug() |