Make container-engine a build (non-global) option (#1792)
This commit is contained in:
@@ -20,11 +20,39 @@ def test_validate_default_schema():
|
||||
assert validator(example) is not None
|
||||
|
||||
|
||||
def test_validate_bad_container_engine():
|
||||
def test_validate_container_engine():
|
||||
"""
|
||||
This test checks container engine can be overridden - it used to be a
|
||||
global option but is now a build option.
|
||||
"""
|
||||
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[tool.cibuildwheel]
|
||||
container-engine = "docker"
|
||||
|
||||
[tool.cibuildwheel.linux]
|
||||
container-engine = "docker"
|
||||
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "*_x86_64"
|
||||
container-engine = "docker; create_args: --platform linux/arm64/v8"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
assert validator(example) is not None
|
||||
|
||||
|
||||
@pytest.mark.parametrize("platform", ["macos", "windows"])
|
||||
def test_validate_bad_container_engine(platform: str):
|
||||
"""
|
||||
container-engine is not a valid option for macos or windows
|
||||
"""
|
||||
example = tomllib.loads(
|
||||
f"""
|
||||
[tool.cibuildwheel.{platform}]
|
||||
container-engine = "docker"
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user