pytest 安装 和 使用

"""
pytest get started
"""
 安装pytest
print('pip install -U pytest')

 获取pytest的版本号
print("pytest --version")

pytest 用例收集机制
print("Pytest将在当前目录及其子目录中运行表单test_*.py或*_test.py的所有文件。测试类以Test开头,测试函数以test_*开头")

执行文件并简短输出报告
print('python -q test_*.py') or print('python --quiet test_*.py')

Original: https://www.cnblogs.com/zengmuyao/p/16387365.html
Author: 奇成
Title: pytest 安装 和 使用

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/603478/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球