python - 如何在 pytest-html 报告中删除环境表
解决方案
文档中的相关位置指出:
Environment 部分由 pytest-metadata, 插件提供,可以通过
pytest_configure
钩子访问:def pytest_configure(config): config._metadata['foo'] = 'bar'
修改config._metadata
将影响呈现的“环境”部分。如果要完全删除它,请将元数据设置为None
:
# conftest.py
def pytest_configure(config):
config._metadata = None
推荐阅读
- javascript - 如何解释以下函数的声明
- events - Oracle Apex:在另一个项目更改时刷新项目
- docker - mcr.microsoft.com/dotnet/core/aspnet:2.2 for windows 容器不可用
- networkx - 如何在 networkx HITS 算法中应用权重选项
- docker - Dockerfile:没有包与 php 匹配
- ruby-on-rails - 带有 Que 和 Dockerized PostgreSQL 的 Rails 6
- python - 无法从 QName 中删除不必要的元素
- dataframe - 根据条件删除数据框的行(比较两列中的数据)
- mongodb - 定义 id uint64 `bson:"_id"` 后如何自动生成 id
- unix - 如何使用 WGET 从 onedrive 下载受保护的文件