Skip to content

Improve integration test options #2385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 16, 2025
Merged

Improve integration test options #2385

merged 3 commits into from
May 16, 2025

Conversation

joerick
Copy link
Contributor

@joerick joerick commented May 10, 2025

Apologies for another 3.x PR, this has been sitting in my local repo for a few days so I thought I'd polish it up.

Essentially, I find myself setting CIBW_ENABLE and CIBW_PLATFORM locally to run integration tests more and more, but as discussed previously, it's not very user friendly.

This necessitates a change from the utils.platform variable we had before to a utils.get_platform() function. But I think it's worth it, it also means we're not duplicating state between os.environ and utils.platform.

joerick added 3 commits May 10, 2025 12:25
- Keep the platform and enable options in os.environ, don't duplicate state in utils
- Provide more user-friendly options for setting enable and platform in integration tests
@joerick joerick requested review from Copilot and henryiii May 15, 2025 13:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the integration testing experience by replacing the static utils.platform attribute with the dynamic utils.get_platform() function. Key changes include updating all platform checks across test files, adding new pytest options in conftest.py for --platform and --enable, and updating documentation and CI workflows to reflect these changes.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test_pep518.py Updated platform checks to use utils.get_platform().
test/test_musllinux_X_Y_only.py Switched from utils.platform to utils.get_platform() for Linux testing.
test/test_manylinuxXXXX_only.py Replaced platform check with a call to utils.get_platform().
test/test_macos_archs.py Updated multiple macOS platform checks to use utils.get_platform().
test/test_linux_python.py Updated Linux platform check to use utils.get_platform().
test/test_ios.py Replaced utils.platform with utils.get_platform() in iOS-specific tests.
test/test_environment.py Replaced platform attribute references with utils.get_platform().
test/test_emulation.py Updated the platform check to use utils.get_platform().
test/test_dependency_versions.py Updated platform-condition checks to utilize utils.get_platform().
test/test_cpp_standards.py Updated platform check for C++ standards and noted a digit separator usage.
test/test_container_images.py Replaced linux platform check with utils.get_platform().
test/test_container_engine.py Updated tests to use utils.get_platform() for Linux environment checks.
test/test_build_frontend_args.py Replaced platform check with a call to utils.get_platform().
test/test_before_test.py Updated platform check to use utils.get_platform() in test setup.
test/test_before_build.py Replaced utils.platform with utils.get_platform() in build-related tests.
test/test_abi_variants.py Updated platform checks to use utils.get_platform() in ABI tests.
test/test_0_basic.py Changed enable group extraction to use utils.get_enable_groups().
test/conftest.py Updated platform-related logic and added new pytest option parsing.
docs/contributing.md Updated instructions to reflect the new --platform and --enable options.
.github/workflows/test.yml Updated the DEFAULT_CIBW_ENABLE import to use test.utils as per changes.
Comments suppressed due to low confidence (1)

test/test_cpp_standards.py:81

  • [nitpick] If the digit separator (100'000) is intentional as a readability aid, consider adding a brief comment to clarify its purpose and ensure consistency with other numeric literals.
cpp14_project.template_context["spam_cpp_top_level_add"] = "int a = 100'000;"

@joerick joerick merged commit 1bc7e90 into main May 16, 2025
26 checks passed
@joerick joerick deleted the test-var-refactor branch May 16, 2025 10:11
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