pytest的自动钩子插件
项目描述
autohooks-plugin-pytest
pytest的autohooks插件。
安装
使用pip安装
您可以使用pip从Python包索引安装autohooks-plugin-pytest的最新稳定版本,请访问pip
python3 -m pip install autohooks-plugin-pytest
使用poetry安装
强烈建议使用poetry来维护项目的依赖项。通常autohooks-plugin-pytest被安装为开发依赖项。
poetry install
使用方法
要激活pytest自动钩子插件,请将以下设置添加到您的pyproject.toml文件中。
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
默认情况下,autohooks插件pytest会检查所有以.py结尾的文件。如果只测试子目录中的文件或具有不同扩展名的文件,请添加以下设置
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
[tool.autohooks.plugins.pytest]
include = ['foo/*.py', '*.foo']
默认情况下,autohooks插件pytest会执行不带任何参数的pytest,并从git仓库根目录的.pytestrc文件中加载pytest设置。要更改特定设置或定义不同的pytest rc文件,可以使用以下插件配置
[tool.autohooks]
pre-commit = ["autohooks.plugins.pytest"]
[tool.autohooks.plugins.pytest]
arguments = ["--rcfile=/path/to/pytestrc", "-s", "n"]
维护者
本项目由Greenbone AG维护。
贡献
我们非常欢迎您的贡献。请在GitHub上创建一个pull request。较大的更改需要先通过GitHub上的问题部分与开发团队进行讨论。
许可
版权 (C) 2021-2023 Greenbone AG
许可协议:GNU通用公共许可证v3.0或更高版本。
项目详情
下载文件
下载适用于您平台的项目文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。
源分发
autohooks_plugin_pytest-23.10.0.tar.gz (15.5 kB 查看哈希值)
构建分发
关闭
autohooks_plugin_pytest-23.10.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 87125b8291e0e04da2d24255581622b957f090f2c96cf50a4396fb455a3c8864 |
|
MD5 | 6962c0730ba1b50f5437b23877f23174 |
|
BLAKE2b-256 | 566f76342f15644c27e8164bd736361dd5995d2d337532a1a03777b9c92fe641 |
关闭
autohooks_plugin_pytest-23.10.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 581a92e09cf7882f5488973290d29f35684bec984537832f26c8a7e7c245eedb |
|
MD5 | 10fada1e17c45ad0cb4e49e95d8a9543 |
|
BLAKE2b-256 | 18352041cdf31e40e921d28e9ffaad2a04fe455622e367fd61522b65cfa1299d |