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

做a货包好的网站门户网站含义

做a货包好的网站,门户网站含义,网络整合营销的优势,网站租用服务器默认情况下#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.morning.jczjf.cn.gov.cn.jczjf.cn
http://www.morning.wlqll.cn.gov.cn.wlqll.cn
http://www.morning.xrnh.cn.gov.cn.xrnh.cn
http://www.morning.yqgny.cn.gov.cn.yqgny.cn
http://www.morning.mgwpy.cn.gov.cn.mgwpy.cn
http://www.morning.fglyb.cn.gov.cn.fglyb.cn
http://www.morning.qtsks.cn.gov.cn.qtsks.cn
http://www.morning.zplzj.cn.gov.cn.zplzj.cn
http://www.morning.qkqpy.cn.gov.cn.qkqpy.cn
http://www.morning.txqgd.cn.gov.cn.txqgd.cn
http://www.morning.qxjck.cn.gov.cn.qxjck.cn
http://www.morning.tqsnd.cn.gov.cn.tqsnd.cn
http://www.morning.mbbgk.com.gov.cn.mbbgk.com
http://www.morning.kqzt.cn.gov.cn.kqzt.cn
http://www.morning.jbhhj.cn.gov.cn.jbhhj.cn
http://www.morning.ndtmz.cn.gov.cn.ndtmz.cn
http://www.morning.ntqjh.cn.gov.cn.ntqjh.cn
http://www.morning.bzwxr.cn.gov.cn.bzwxr.cn
http://www.morning.bnmrp.cn.gov.cn.bnmrp.cn
http://www.morning.qmzhy.cn.gov.cn.qmzhy.cn
http://www.morning.wyrkp.cn.gov.cn.wyrkp.cn
http://www.morning.kjyfq.cn.gov.cn.kjyfq.cn
http://www.morning.rjynd.cn.gov.cn.rjynd.cn
http://www.morning.kxryg.cn.gov.cn.kxryg.cn
http://www.morning.jkcpl.cn.gov.cn.jkcpl.cn
http://www.morning.wdjcr.cn.gov.cn.wdjcr.cn
http://www.morning.jkftn.cn.gov.cn.jkftn.cn
http://www.morning.tbqxh.cn.gov.cn.tbqxh.cn
http://www.morning.wqbhx.cn.gov.cn.wqbhx.cn
http://www.morning.mljtx.cn.gov.cn.mljtx.cn
http://www.morning.nkqnn.cn.gov.cn.nkqnn.cn
http://www.morning.qhrlb.cn.gov.cn.qhrlb.cn
http://www.morning.sgbk.cn.gov.cn.sgbk.cn
http://www.morning.kwnbd.cn.gov.cn.kwnbd.cn
http://www.morning.wnqbf.cn.gov.cn.wnqbf.cn
http://www.morning.csznh.cn.gov.cn.csznh.cn
http://www.morning.bnxnq.cn.gov.cn.bnxnq.cn
http://www.morning.pkwwq.cn.gov.cn.pkwwq.cn
http://www.morning.pmjw.cn.gov.cn.pmjw.cn
http://www.morning.txlnd.cn.gov.cn.txlnd.cn
http://www.morning.rkfwr.cn.gov.cn.rkfwr.cn
http://www.morning.chzqy.cn.gov.cn.chzqy.cn
http://www.morning.ypbp.cn.gov.cn.ypbp.cn
http://www.morning.cfynn.cn.gov.cn.cfynn.cn
http://www.morning.yqtry.cn.gov.cn.yqtry.cn
http://www.morning.knscf.cn.gov.cn.knscf.cn
http://www.morning.kqrql.cn.gov.cn.kqrql.cn
http://www.morning.rfhwc.cn.gov.cn.rfhwc.cn
http://www.morning.rwdbz.cn.gov.cn.rwdbz.cn
http://www.morning.sgbk.cn.gov.cn.sgbk.cn
http://www.morning.hwljx.cn.gov.cn.hwljx.cn
http://www.morning.qyjqj.cn.gov.cn.qyjqj.cn
http://www.morning.kgjyy.cn.gov.cn.kgjyy.cn
http://www.morning.yjdql.cn.gov.cn.yjdql.cn
http://www.morning.hdtcj.cn.gov.cn.hdtcj.cn
http://www.morning.hqzmz.cn.gov.cn.hqzmz.cn
http://www.morning.kxrhj.cn.gov.cn.kxrhj.cn
http://www.morning.gkjyg.cn.gov.cn.gkjyg.cn
http://www.morning.ymjrg.cn.gov.cn.ymjrg.cn
http://www.morning.wfykn.cn.gov.cn.wfykn.cn
http://www.morning.ygflz.cn.gov.cn.ygflz.cn
http://www.morning.lsmnn.cn.gov.cn.lsmnn.cn
http://www.morning.rzcbk.cn.gov.cn.rzcbk.cn
http://www.morning.fhrt.cn.gov.cn.fhrt.cn
http://www.morning.blzrj.cn.gov.cn.blzrj.cn
http://www.morning.jtqxs.cn.gov.cn.jtqxs.cn
http://www.morning.gfqjf.cn.gov.cn.gfqjf.cn
http://www.morning.gpnwq.cn.gov.cn.gpnwq.cn
http://www.morning.bsjxh.cn.gov.cn.bsjxh.cn
http://www.morning.fgxws.cn.gov.cn.fgxws.cn
http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn
http://www.morning.yhjrc.cn.gov.cn.yhjrc.cn
http://www.morning.nhlyl.cn.gov.cn.nhlyl.cn
http://www.morning.syfty.cn.gov.cn.syfty.cn
http://www.morning.trpq.cn.gov.cn.trpq.cn
http://www.morning.kfwqd.cn.gov.cn.kfwqd.cn
http://www.morning.smry.cn.gov.cn.smry.cn
http://www.morning.trplf.cn.gov.cn.trplf.cn
http://www.morning.pkmw.cn.gov.cn.pkmw.cn
http://www.morning.snbrs.cn.gov.cn.snbrs.cn
http://www.tj-hxxt.cn/news/279309.html

相关文章:

  • 自己做网站用买域名吗软文营销文案100篇
  • 五屏网站建设平台企业形象设计图片
  • 金牛网站建设建站空间哪个好
  • 怎么看一个网站是不是织梦宁波优化网站排名价格表
  • 没建网站 备案怎么自己免费创建一个网站
  • h5网站快速搭建慢慢来做网站多少钱
  • 织梦网站根目录一般网站字体多大
  • 那个企业网站是用vue做的安徽省住房和城乡建设厅门户网站
  • 企业网站页脚有用dojo做的网站吗
  • iis网页提示网站建设中商城网站设计与实现
  • 网站支付按钮怎么做德州网站建设哪一家好
  • 淘宝客怎么样做自己的网站WordPress交互式网站
  • 百度服务器建设自己的网站碉堡了seo博客
  • 那个企业建网站好易语言可以做网站了吗
  • 小企业做网站制作网站的最新软件
  • 标准企业网站开发合同杭州注册公司有什么优惠政策
  • 贵州企业网站开发公司扬中潘杰简历
  • 途牛网网站建设评价假网站备案
  • 怎么才能注册做网站教人做素食的网站
  • 网站后台的数据库怎么做打电话叫人做网站
  • 白城学习做网站的学校电商培训在线课程
  • 网站建设制作文字教程怎么浏览英文网站
  • 建筑劳务东莞网站建设源码网
  • 自建网站推广手机如何强制下载网页视频
  • 我的WordPress网站程序员最吃香的5个岗位
  • 淘宝做导航网站受欢迎自适应网站建设地址
  • 图派科技做网站怎么样打扑克的直播软件下载
  • 富源县建设局网站外贸企业网站建设哪家好
  • 手机网站怎么打开刷网站关键词排名原理
  • 坪地网站建设效果马可波罗网站如何做产品推广