pytest
pytest
我是一言
记笔记,笔记,记…
展开
-
pytest框架学习_1
pytest框架安装pytestpip install -U pytest查看安装版本pip show pytestpytest --version先看官网的一个例子,这个例子告诉你pytest的执行规则:新建一个test_sample.py文件,代码如下:def func(x): return x + 1def test_anwder(): asse...原创 2019-05-12 16:05:00 · 68 阅读 · 0 评论 -
pytest conftest
目录结构conftest.py__author__ = 'kangpc'__date__ = '2020-7-13 18:04'"""conftest.py配置需要注意以下点: conftest.py配置脚本名称是固定的,不能改名称 conftest.py与运行的用例要在同一个pakage下,并且有__init__.py文件 不需要import导入 conftest.py,p...原创 2020-07-14 00:27:00 · 74 阅读 · 0 评论