- 博客(5)
- 问答 (1)
- 收藏
- 关注
原创 Pytest报错:AttributeError: “Function”object has no attribute “get marker”
报错信息:解决方案:升级pytest_remotdata 依赖包
2022-02-07 15:58:05
321
原创 pytest报错:AttributeError:module ‘allure’has no attribute ‘severity_level’
把pytest测试报告生成方式从allure-pytest换成pytest-html时,出现报错信息,无法运行测试案例错误信息:解决办法:pipuninstall allure-pytest解决
2022-01-20 13:45:33
1354
2
原创 pytest.ini最基础配置方法,一眼看懂
前置条件: 1.文件路径: - Test_App - - test_abc.py - - pytest.ini 2.pyetst.ini配置文件内容: [pytest] 命令行参数 addopts = -s 搜索文件名 python_files = test_*.py...
2022-01-19 21:36:03
316
原创 pytest按自定义顺序执行测试案例,mark.run方法的使用
案例:import pytestclass Test_ABC: @pytest.mark.run(order=2) def test_a(self): print("------->test_a") assert 1 @pytest.mark.run(order=1) def test_b(self): print("------->test_b") assert 1 @pytest....
2022-01-19 21:25:29
867
原创 pytest报错:TypeError: `args` parameter expected to be a list of strings
错误信息:解决方案:pytest main函数参数修改:pytest.main(["-s","test_abc.py"])
2022-01-19 20:58:03
554
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人