我使用argparse处理命令行参数。代码运行良好。不过,一旦我补充unittest.main()总的来说,它不起作用。在
我得到了:
I am here
option -i not recognized
Usage: testing.py [options] [test] [...]
Options:
-h, --help Show this message
-v, --verbose Verbose output
-q, --quiet Minimal output
-f, --failfast Stop on first failure
-c, --catch Catch control-C and display results
-b, --buffer Buffer stdout and stderr during test runs
Examples:
testing.py - run default set of tests
testing.py MyTestSuite - run suite 'MyTestSuite'
testing.py MyTestCase.testSomething - run MyTestCase.testSomething
testing.py MyTestCase - run all 'test*' test methods
in MyTestCase
我是这样做的:
^{pr2}$
使用
而不是:
^{pr2}$相关问题 更多 >
编程相关推荐