pytest_按标记执行

白昼怎懂夜的黑 提交于 2020-01-28 00:31:43
import pytest@pytest.mark.webtestdef test_send_http():    pass@pytest.mark.apptestdef test_devide():    pass@pytest.mark.androiddef test_search():    pass@pytest.mark.iosdef test_add():    passdef test_plus():    pass-m 是标记-s 显示内部打印信息

pytest -s test_mark.py -m 'not ios' 执行标记不等于ios的

pytest -s test_mark.py -m ios  只执行标记==ios的

pytest -s test_mark.py -m=ios  只执行标记==ios的

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!