Skip to main content

Default template for PDM package

Project description

pytest-result-notify

一个用于将 Pytest 测试结果通知到 Slack 的工具。

安装

使用 pdm 进行依赖管理。请确保你已经安装了 pdm,然后运行以下命令来安装项目依赖:

pdm install
  • 如果尚未安装 pdm,可以通过以下命令安装:
pip install pdm

使用

格式化

pdm format

检查

pdm check

测试

pdm test -s

配置 slack 通知

  1. 获取你的 Slack API Token。你需要在 Slack 上创建一个应用并获取一个有效的 API Token。
  2. 设置环境变量 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_result_notify-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest_result_notify-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_result_notify-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1085f171c1cefba093bb39b5478faf30e233cc99f72945e8bf5dab5db50b60
MD5 a8851c9ad26f62dabc34f119849d0f8e
BLAKE2b-256 607c2b435f6a5942624ded4297db22abfc08994c6b7bd289509c1e95b4b8421c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page