pytest-result-notify
一个用于将 Pytest 测试结果通知到 Slack 的工具。
安装
使用 pdm 进行依赖管理。请确保你已经安装了 pdm,然后运行以下命令来安装项目依赖:
pdm install
- 如果尚未安装 pdm,可以通过以下命令安装:
pip install pdm
使用
格式化
pdm format
检查
pdm check
测试
pdm test -s
配置 slack 通知
- 获取你的 Slack API Token。你需要在 Slack 上创建一个应用并获取一个有效的 API Token。
- 设置环境变量 SLACK_API_TOKEN,将你的 Slack API Token 和 Slack URL 添加到环境变量中:
export SLACK_API_TOKEN='your_slack_api_token_here'
export SLACK_URL='your_slack_url_here'
完成示例
# 安装依赖
pdm install
# 格式化代码
pdm run format
# 检查代码
pdm run check
# 设置 Slack API 环境变量
export SLACK_API_TOKEN='your_slack_api_token_here'
export SLACK_URL='your_slack_url_here'
# 运行测试并发送结果到 Slack
pdm run test -s
Metadata
Release files for pytest-result-notify 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_result_notify-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pytest_result_notify-0.1.1-py3-none-any.whl |
Release files / pytest_result_notify-0.1.1-py3-none-any.whl
| Download URL | pytest_result_notify-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c1085f171c1cefba093bb39b5478faf30e233cc99f72945e8bf5dab5db50b60
|
|
BLAKE2b-256 checksum How to use checksums |
607c2b435f6a5942624ded4297db22abfc08994c6b7bd289509c1e95b4b8421c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for pytest-result-notify 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.