Skip to content

test: cover config settings forwarding in build_package and build_package_via_sdist - #1058

Merged
gaborbernat merged 6 commits into
pypa:mainfrom
terminalchai:test/config-settings-coverage
May 29, 2026
Merged

gaborbernat merged 6 commits into
pypa:mainfrom
terminalchai:test/config-settings-coverage

Conversation

@terminalchai

Copy link
Copy Markdown
Contributor

Problem

build_package and build_package_via_sdist both accept a config_settings parameter and forward it to _build, but there were no tests verifying that this forwarding actually happens. A refactor that silently dropped config_settings from the _build call would pass the existing test suite.

Fix

Add two unit tests:

  • test_build_package_passes_config_settings_to_build — calls build_package with config_settings={'--flag': 'value'} and asserts both the sdist and wheel _build calls receive the settings in the correct position.
  • test_build_package_via_sdist_passes_config_settings_to_build — same for build_package_via_sdist, also covering the sdist→wheel two-step flow (temp dir creation, extraction, cleanup).

Both tests also cover the other recently-added parameters (dependency_constraints_txt, installer) to make the call signatures explicit.

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict 🤔

terminalchai added a commit to terminalchai/build that referenced this pull request May 9, 2026
@gaborbernat

Copy link
Copy Markdown
Contributor

@terminalchai can you fix the CI and also the merge conflict?

@gaborbernat
gaborbernat marked this pull request as draft May 28, 2026 14:37
@terminalchai
terminalchai force-pushed the test/config-settings-coverage branch from d2689c8 to 5d72702 Compare May 28, 2026 20:38
@gaborbernat
gaborbernat marked this pull request as ready for review May 29, 2026 22:36
@gaborbernat
gaborbernat merged commit c48adc6 into pypa:main May 29, 2026
10 checks passed
@layday

layday commented May 29, 2026

Copy link
Copy Markdown
Member

It looks like nothing's been changed here?

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.

4 participants