当前位置: 首页 > news >正文

arcengine网站开发wordpress批量提交

arcengine网站开发,wordpress批量提交,岳阳网站开发公司,怎么找需要做推广的公司默认情况下#xff0c;pytest 使用pytest.Package来收集包含 __init__.py 文件的目录#xff0c;使用 pytest.Dir来收集其他目录。如果你想要自定义目录的收集方式#xff0c;你可以编写自己的pytest.Directory 收集器#xff0c;并使用 pytest_collect_directory钩子来连接…默认情况下pytest 使用pytest.Package来收集包含 __init__.py 文件的目录使用 pytest.Dir来收集其他目录。如果你想要自定义目录的收集方式你可以编写自己的pytest.Directory 收集器并使用 pytest_collect_directory钩子来连接它。 对于目录清单文件的一个基本示例 假设你想要自定义每个目录的收集方式。以下是一个conftest.py插件的示例它允许目录包含一个manifest.json文件该文件定义了该目录的收集方式。在这个示例中仅支持一个简单的文件列表但你可以想象添加其他键如排除项和通配符。 from __future__ import annotations import json import pytest class ManifestDirectory(pytest.Directory): def collect(self): # pytest的标准行为是遍历所有test_*.py文件并对每个文件调用pytest_collect_file。 # 这个收集器改为读取manifest.json文件并且仅对其中定义的文件调用pytest_collect_file。 manifest_path self.path / manifest.json manifest json.loads(manifest_path.read_text(encodingutf-8)) ihook self.ihook for file in manifest[files]: yield from ihook.pytest_collect_file( file_pathself.path / file, parentself ) pytest.hookimpl def pytest_collect_directory(path, parent): # 对于包含manifest.json文件的目录使用我们的自定义收集器。 if path.joinpath(manifest.json).is_file(): return ManifestDirectory.from_parent(parentparent, pathpath) # 否则回退到标准行为。 return None 你可以创建一个 manifest.json 文件和一些测试文件 {files: [test_first.py,test_second.py] } # content of test_first.py from __future__ import annotationsdef test_1():pass # content of test_second.py from __future__ import annotationsdef test_2():pass # content of test_third.py from __future__ import annotationsdef test_3():pass 现在你可以执行测试规范了: customdirectory $ pytesttest session starts platform linux -- Python 3.x.y, pytest-8.x.y, pluggy-1.x.y rootdir: /home/sweet/project/customdirectory configfile: pytest.ini collected 2 itemstests/test_first.py . [ 50%] tests/test_second.py . [100%] 2 passed in 0.12s 请注意test_three.py 没有被执行因为它没有在清单中列出。 你可以验证你的自定义收集器是否出现在收集树中 customdirectory $ pytest --collect-onlytest session starts platform linux -- Python 3.x.y, pytest-8.x.y, pluggy-1.x.y rootdir: /home/sweet/project/customdirectory configfile: pytest.ini collected 2 itemsDir customdirectoryManifestDirectory testsModule test_first.pyFunction test_1Module test_second.pyFunction test_2 2 tests collected in 0.12s
http://www.w-s-a.com/news/135226/

相关文章:

  • 做网站的技术要求搜索栏在wordpress菜单上位置
  • 如何给网站弄ftpwordpress怎么添加关键词描述
  • 成都工程建设信息网站金科网站建设
  • 传媒公司 网站开发厦门网站建设门户
  • 宿城区建设局网站做网站的绿色背景图
  • 网站空间托管合同 .doc网站开发团队 组建
  • 网站建设书本信息it运维服务
  • 四核网站建设设计网站流程
  • ui设计网站设计与网页制作视频教程wordpress插件漏洞利用
  • 网站建设公司排名前十做网站的最终目的
  • 选择网站开发公司的标准中国网站建设市场规模
  • 衣服网站建设策划书广州住房和城乡建设部网站
  • 微商城科技淄博网站建设优化seo
  • 杭州 网站设计制作东圃手机网站开发
  • 网站文章页内链结构不好可以改吗微信平台如何开发
  • 炫酷业务网站课程网站如何建设方案
  • 网站建设服务器可以租吗wordpress微信打赏
  • 网站制作的重要流程图大连网站优化快速排名
  • 河南省住房建设厅官方网站注册公司邮箱需要什么
  • 美橙网站注册华为手机网站建设策划方案论文
  • 河南省和建设厅网站首页在线图片翻译
  • 关于备案空壳网站清理通知去别人网站挂黑链
  • 做网站待遇世界购物平台排行榜
  • 售后服务网站什么网站免费做简历模板
  • 网站模板怎么修改成都网站优化seo
  • 给装修公司做推广的网站wordpress站点的根目录
  • 怎么创建企业网站wordpress怎么做404页面跳转
  • 福建省住房和建设厅网站网站做著作权
  • 编程代码网站网站搭建的注意事项
  • 音乐网站排名公司如何做自己的网站