摘要: pytest的规则使用 """ 使用pytest编写用例,必须遵守以下规则: (1)测试文件名必须以“test_”开头或者"_test"结尾(如:test_ab.py) (2)测试类命名以"Test"开头。 (3)测试方法必须以“test_”开头。 conftest.py与运行的用例要在同一个pak 阅读全文
posted @ 2023-02-05 15:55 南方的墙 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 一、pytest.ini执行方式含义 [pytest] addopts = -vsq --html=./report.html testpaths = ./testConftest python_files = test*.py python_classes = Test* python_funct 阅读全文
posted @ 2023-02-05 15:44 南方的墙 阅读(53) 评论(0) 推荐(0) 编辑