会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
MyRecords
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
2023年5月4日
pytest的fixture
摘要: 1 什么是fixture @pytest.fixture def my_fruit(): return Fruit("apple") 如上,用@pytest.fixture装饰的函数就是fixture 2 fixture的作用 我的理解是为test函数的运行提供数据、必要的环境支持等 3 fixtu
阅读全文
posted @ 2023-05-04 16:53 工作手记
阅读(28)
评论(0)
推荐(0)
2023年5月2日
pytest常用断言
摘要: ##如上官网所说,pytest使用python中的assert来比较实际值与预期值,实现断言功能 ##1 常用的断言方式 assert xxx assert a == b assert a!=b assert a > b assert a <b assert a in b assert a not
阅读全文
posted @ 2023-05-02 21:10 工作手记
阅读(400)
评论(0)
推荐(0)
2023年5月1日
pytest的几种执行方式
摘要: 1 pytest xxxx 2 python -m pytest xxxx python -m pytest --html=./report/rep2.html test_env_pytest_ini.py 这个与pytest几乎是相同的,官网是这样说的 3 python pytest xxx 这与
阅读全文
posted @ 2023-05-01 23:27 工作手记
阅读(210)
评论(0)
推荐(0)
2023年4月30日
pytest命令行选项
摘要: 一、pytest有很多命令行选项如 -v 输出详细信息 -q 简要输出 -s 打印输出 -k "xxx" 在file name、class name、function name来匹配xxx规则,pytest只运行符合匹配结果的部分 -m xx 寻找具有xx mark的test来运行或不运行 -x 遇
阅读全文
posted @ 2023-04-30 21:53 工作手记
阅读(173)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
公告