摘要:
二、fixture特性 1. 将fixture作为形参使用 import pytest@pytest.fixture()def myfunc(): print("这是一个前置") yield 100 # 前后置分割线以及返回值 print("这是一个后置")def test_01(myfunc): 阅读全文
posted @ 2019-12-29 21:53
酸菜鱼头
阅读(453)
评论(0)
推荐(0)
摘要:
1. pytest命名规则 模块的命名要以“test”开头或者“_test.py”结尾 类的命名要以“Test”开头 测试用例的命名要以“test”开头 2. 使用pytest执行测试用例 cmd命令行参数运行: 1)最多允许失败的用例 pytest -x # 遇到第一个失败时,退出执行pytest 阅读全文
posted @ 2019-12-29 16:22
酸菜鱼头
阅读(560)
评论(0)
推荐(0)

浙公网安备 33010602011771号