Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

cibuildwheel's test environment was missing pytest-cov, causing coverage collection to fail during CI wheel tests despite --cov=apyds being configured in pytest options.

Changes

  • Added pytest-cov to [tool.cibuildwheel] test-requires (no version pin per request)
test-requires = ["pytest", "pytest-cov"]

The dev dependencies already include pytest-cov; this aligns the cibuildwheel test environment.

Original prompt

Create a new branch named ci/add-pytest-cov-to-cibuildwheel from main, modify pyproject.toml to ensure cibuildwheel installs pytest-cov during its test step, commit and open a pull request.

Files to change:

  • pyproject.toml (path at repo root)

Change required:
In the [tool.cibuildwheel] section, update the test-requires setting from:
test-requires = ["pytest"]
to:
test-requires = ["pytest", "pytest-cov"]

Notes and constraints:

  • Do not pin a version for pytest-cov (no version specifier, user requested "不要指定版本").
  • Keep all other file content unchanged and preserve formatting.
  • Commit message: "Add pytest-cov to cibuildwheel test-requires in pyproject.toml".
  • PR title: "ci: add pytest-cov to cibuildwheel test-requires".
  • PR description: "Add pytest-cov to the cibuildwheel test-requires in pyproject.toml so that cibuildwheel's test environment installs pytest-cov and can collect coverage during CI. No version is pinned per request. The project's optional dev dependencies already include pytest-cov."
  • Base branch: main

Please create the branch, apply the change, push the branch, and open a pull request with the specified title and description.

This pull request was created as a result of the following prompt from Copilot chat.

Create a new branch named ci/add-pytest-cov-to-cibuildwheel from main, modify pyproject.toml to ensure cibuildwheel installs pytest-cov during its test step, commit and open a pull request.

Files to change:

  • pyproject.toml (path at repo root)

Change required:
In the [tool.cibuildwheel] section, update the test-requires setting from:
test-requires = ["pytest"]
to:
test-requires = ["pytest", "pytest-cov"]

Notes and constraints:

  • Do not pin a version for pytest-cov (no version specifier, user requested "不要指定版本").
  • Keep all other file content unchanged and preserve formatting.
  • Commit message: "Add pytest-cov to cibuildwheel test-requires in pyproject.toml".
  • PR title: "ci: add pytest-cov to cibuildwheel test-requires".
  • PR description: "Add pytest-cov to the cibuildwheel test-requires in pyproject.toml so that cibuildwheel's test environment installs pytest-cov and can collect coverage during CI. No version is pinned per request. The project's optional dev dependencies already include pytest-cov."
  • Base branch: main

Please create the branch, apply the change, push the branch, and open a pull request with the specified title and description.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Copilot AI changed the title [WIP] ci: add pytest-cov to cibuildwheel test-requires ci: add pytest-cov to cibuildwheel test-requires Nov 28, 2025
Copilot AI requested a review from hzhangxyz November 28, 2025 03:00
@hzhangxyz hzhangxyz marked this pull request as ready for review November 28, 2025 04:26
@hzhangxyz hzhangxyz merged commit 1a81978 into main Nov 28, 2025
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants