摘要: 介绍 config.cache是一个实例pytest.Cache:该config.cache对象允许其他插件和装置在测试运行中存储和检索值。要从 fixtures 请求访问它pytestconfig到您的 fixture 并使用pytestconfig.cache. 函数 mkdir返回给定的nam 阅读全文
posted @ 2022-11-15 10:39 zhq9 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 介绍 pytester是pytest框架的内置fixture,想使用pytester要在conftest.py或者是用例文件的最上面添加pytest_plugins = "pytester" 默认临时目录可以通过tmp_path fixture查看,也可以使用--basetemp=mydir定义临时 阅读全文
posted @ 2022-11-15 10:09 zhq9 阅读(37) 评论(0) 推荐(0) 编辑