HTMLTestRunner放入Python环境中
1
2sudo cp ~/Downloads/HTMLTestRunner.py /Library/Python/2.7/site-packages
sudo cp ~/Downloads/test_HTMLTestRunner.py /Library/Python/2.7/site-packages执行
import HTMLTestRunner
, 如果没有报错,则导入成功。通过
dir(HTMLTestRunner)
, 查看HTMLTestRunner包含方法:1
['HTMLTestRunner', 'OutputRedirector', 'StringIO', 'Template_mixin', 'TestProgram', 'TestResult', '_TestResult', '__author__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', 'datetime', 'main', 'saxutils', 'stderr_redirector', 'stdout_redirector', 'sys', 'time', 'unittest']