From e05f5d962ea533e3159167af48a83f98f9cc6178 Mon Sep 17 00:00:00 2001 From: Richard Darst Date: Fri, 11 Sep 2009 01:26:15 +0000 Subject: 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 --- 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() -- cgit v0.9.1