鼻子测试的彩色输出
rednose的Python项目详细描述
红鼻子是一个nosetests 为nosetest控制台结果添加颜色(和可读性)的插件。
安装:
pip install rednose
或者来源:
python setup.py install
rednose正式支持python 2.7、3.4和3.5。
用法:
nosetests --rednose
或:
export NOSE_REDNOSE=1 nosetests
红鼻子在默认情况下使用自动着色,这将只使用 如果你在终端上运行它(即不是管道 一个文件)。要控制颜色,请使用以下选项之一:
nosetests --rednose --force-color nosetests --no-color
(您也可以通过将环境变量nose_rednose_color设置为'force'或'no'来控制此情况)
默认情况下,rednose打印与工作相关的文件路径 目录。如果你想在回溯中找到完整的路径 使用:
nosetests --rednose --full-file-path
默认情况下,rednose为跳过的测试打印错误样式格式化, 要抑制这种使用:
nosetests --rednose --hide-skips
rednose支持在运行中以及运行时打印测试结果 结束,要启用它,请使用:
nosetests --rednose --immediate