Nose插件,按类/模块分组打印更漂亮的点。
项目描述
这是一个nosetests插件,按类/模块分组打印更漂亮的点。
安装
从PyPI
pip install nosenicedots
或从源
pip install -e git+git://github.com/kumar303/nose-nicedots.git#egg=nosenicedots
用法
nosetests --with-nicedots
示例
$ nosetests --with-nicedots apps/devhub/tests/test_views.py:TestActivity .............. apps/devhub/tests/test_views.py:TestAddVersion . ====================================================================== FAIL: apps/devhub/tests/test_views.py:TestAddVersion.test_unique_version_num ---------------------------------------------------------------------- Traceback (most recent call last): File "/path/to/apps/devhub/tests/test_views.py", line 3132, in test_unique_version_num assert 0 AssertionError apps/devhub/tests/test_views.py:TestCreateFoobar .. apps/devhub/tests/test_views.py:TestDashboard ..... apps/devhub/tests/test_views.py:TestDelete .. ====================================================================== FAIL: apps/devhub/tests/test_views.py:TestAddVersion.test_unique_version_num ---------------------------------------------------------------------- Traceback (most recent call last): File "/path/to/apps/devhub/tests/test_views.py", line 3132, in test_unique_version_num assert 0 AssertionError ---------------------------------------------------------------------- Ran 44 tests in 1.62s FAILED (failures=1)
这种新风格的输出旨在作为一个更有用的测试报告,并受py.test的启发。您将看到模块或类后面的点,这些点表示该组中的每个测试。
您将立即看到失败的堆栈跟踪,这是为长时间运行的测试套件设计的。请注意,堆栈跟踪还会在底部重复,以防输出已经滚动到屏幕之外。使用--stop将不会重复失败输出。
它也是一个测试地址
每个模块或类组也同时作为您可以给Nose的参数,如果您想重新运行该组测试。从上面的输出中,您可以复制/粘贴并像这样重新运行TestActivity类中的测试
$ nosetests --with-nicedots apps/devhub/tests/test_views.py:TestActivity apps/devhub/tests/test_views.py:TestActivity .............. ---------------------------------------------------------------------- Ran 14 tests in 0.62s OK
注意事项
如果其他插件需要修补unittest结果,则将与Nice Dots冲突。
目前支持Python 2.5、2.6和2.7。其他版本可能或可能不支持。Python 3目前不支持。有几个失败的测试。
项目详情
关闭
nosenicedots-0.5.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 92ee3b86b5c1921c2d9dac217bef8990c5f852c8bc4d9018cafe0f3f3b81cd3a |
|
MD5 | 624a1501e26cc9a5ea59c0a5bf599396 |
|
BLAKE2b-256 | 44c41d55fd44d68d6ecdf81a1a338231f9872b415a42fd6321b73b0056c351f8 |