Improve integration test options (#2385)

* Improve integration test options

- 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

* Ensure that CIBW_ENABLE is set in the test process

* Use get_enable_groups() where necessary
This commit is contained in:
Joe Rickerby
2025-05-16 11:11:16 +01:00
committed by GitHub
parent 166465b56d
commit 1bc7e904b8
24 changed files with 130 additions and 75 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ def test_build_frontend_args(tmp_path, capfd, frontend_name):
# the build will fail because the frontend is called with '-h' - it prints the help message
add_env = {"CIBW_BUILD_FRONTEND": f"{frontend_name}; args: -h"}
if utils.platform == "pyodide":
if utils.get_platform() == "pyodide":
add_env["TERM"] = "dumb" # disable color / style
add_env["NO_COLOR"] = "1"
with pytest.raises(subprocess.CalledProcessError):
@@ -33,7 +33,7 @@ def test_build_frontend_args(tmp_path, capfd, frontend_name):
if frontend_name == "pip":
assert "Usage:" in captured.out
assert "Wheel Options:" in captured.out
elif utils.platform == "pyodide":
elif utils.get_platform() == "pyodide":
assert "Usage: pyodide build" in captured.out
else:
assert "usage:" in captured.out