摘要: 作用是让指定用例无条件的重复运行count次 导包:pip install pytest-repeat 命令行参数 --count=5 --repeat-scope=function 主函数参数 --count=5 --repeat-scope=function 装饰器参数 @pytest.mark 阅读全文
posted @ 2021-01-07 11:04 一只Newbie 阅读(128) 评论(0) 推荐(0)
摘要: 参考:pytest xfail参数详解 - jescs - 博客园 (cnblogs.com) 函数 test_one 的断言结果是 False ,所以用例执行结果为 xfailed 但 test_two 的断言结果为True,所以用例执行结果为 xpassed 总结:当被 @pytest.mark 阅读全文
posted @ 2020-12-21 14:44 一只Newbie 阅读(154) 评论(0) 推荐(0)
摘要: skip:无条件跳过 @pytest.mark.skip 1 import pytest 2 3 class Test_One(): 4 @pytest.mark.skip 5 def test_01(self): 6 print(" > test_01") 7 8 def test_02(self 阅读全文
posted @ 2020-12-17 16:32 一只Newbie 阅读(554) 评论(0) 推荐(0)
摘要: 一个Python 项目中可能安装很多安装包,再次创建虚拟环境是需要重新安装的话很麻烦也费时间,或者项目部署的时候避免重装,可以将现有项目的所有安装包记录在 requirements.txt 文件,再在另一个环境下一键安装所有安装包。 requirements.txt 文件,用于记录所有依赖包及其精确 阅读全文
posted @ 2020-12-17 14:15 一只Newbie 阅读(492) 评论(0) 推荐(0)