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:
@@ -6,7 +6,7 @@ import pytest
|
||||
from . import test_projects, utils
|
||||
|
||||
# pyodide does not support building without isolation, need to check the base_prefix
|
||||
SYS_PREFIX = f"sys.{'base_' if utils.platform == 'pyodide' else ''}prefix"
|
||||
SYS_PREFIX = f"sys.{'base_' if utils.get_platform() == 'pyodide' else ''}prefix"
|
||||
|
||||
|
||||
project_with_before_build_asserts = test_projects.new_c_project(
|
||||
@@ -45,7 +45,7 @@ def test(tmp_path):
|
||||
f'''python -c "import pathlib, sys; pathlib.Path('{{project}}/pythonprefix_bb.txt').write_text({SYS_PREFIX})"'''
|
||||
)
|
||||
frontend = "build"
|
||||
if utils.platform != "pyodide":
|
||||
if utils.get_platform() != "pyodide":
|
||||
before_build = f"python -m pip install setuptools && {before_build}"
|
||||
frontend = f"{frontend};args: --no-isolation"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user