Python unittest and discovery
问题 I have directories, which contain files named like: test_foo.py Each file is a test case. I would like to 1) Run all the tests in a directory from the command line. I am using unittest2 , since we are running Python 2.5.1. From one of these directories I tried typing this at the command line: python -m unittest2 discover -p 'test_*.py' and several different variants. I get no error, but nothing happens. I was expecting all the tests within all the test cases in that directory to run and get