pytest-sugar使用



无他,主要是安装了pytest-sugar之后,使用pytest运行代码,风格依然没有变化,在此记录一下

1. 安装pytest-sugar

pip install pytest-sugar

2. 运行

安装完成后,通过pytest运行代码,sugar不生效,查看pytest-sugar官方文档: https://pypi.org/project/pytest-sugar/

发现pytest-sugar需要有其他依赖(共3个):

  • Python 2.7, 3.4 or newer

  • pytest2.9.0 or newer

  • pytest-xdist 1.14 or above if you want the progress bar to work while running tests in parallel

我运行不生效的原因是:没有安装pytest-xdist,安装后,运行生效

3.不使用sugar用法:

py.test -p no:sugar


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM