chore: some cleanup and checks (#2792)
* chore: clean up config a bit * chore: add an extra check * Apply suggestions from code review Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
@@ -184,7 +184,7 @@ def get_default_repair_command(platform: str) -> str:
|
||||
return "auditwheel repair -w {dest_dir} {wheel}"
|
||||
elif platform == "macos":
|
||||
return "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
|
||||
elif platform == "windows" or platform == "pyodide":
|
||||
elif platform in {"windows", "pyodide"}:
|
||||
return ""
|
||||
else:
|
||||
msg = f"Unknown platform: {platform!r}"
|
||||
|
||||
@@ -539,11 +539,10 @@ def test_disable_host_mount(
|
||||
def test_local_image(
|
||||
container_engine: OCIContainerEngineConfig, platform: OCIPlatform, tmp_path: Path
|
||||
) -> None:
|
||||
if (
|
||||
detect_ci_provider() == CIProvider.travis_ci
|
||||
and DEFAULT_OCI_PLATFORM != OCIPlatform.AMD64
|
||||
and platform != DEFAULT_OCI_PLATFORM
|
||||
):
|
||||
if detect_ci_provider() == CIProvider.travis_ci and DEFAULT_OCI_PLATFORM not in {
|
||||
OCIPlatform.AMD64,
|
||||
platform,
|
||||
}:
|
||||
pytest.skip("Skipping test because docker on this platform does not support QEMU")
|
||||
if container_engine.name == "podman" and platform == OCIPlatform.ARMV7:
|
||||
# both GHA & local macOS arm64 podman desktop are failing
|
||||
@@ -569,11 +568,10 @@ def test_local_image(
|
||||
|
||||
@pytest.mark.parametrize("platform", list(OCIPlatform))
|
||||
def test_multiarch_image(container_engine, platform):
|
||||
if (
|
||||
detect_ci_provider() == CIProvider.travis_ci
|
||||
and DEFAULT_OCI_PLATFORM != OCIPlatform.AMD64
|
||||
and platform != DEFAULT_OCI_PLATFORM
|
||||
):
|
||||
if detect_ci_provider() == CIProvider.travis_ci and DEFAULT_OCI_PLATFORM not in {
|
||||
OCIPlatform.AMD64,
|
||||
platform,
|
||||
}:
|
||||
pytest.skip("Skipping test because docker on this platform does not support QEMU")
|
||||
if container_engine.name == "podman" and platform == OCIPlatform.ARMV7:
|
||||
# both GHA & local macOS arm64 podman desktop are failing
|
||||
|
||||
@@ -339,13 +339,12 @@ def test_resolve_cascade_merge_list(ignore_empty, rule):
|
||||
|
||||
if not ignore_empty:
|
||||
assert answer == "b1 b2"
|
||||
else:
|
||||
if rule == InheritRule.PREPEND:
|
||||
assert answer == "b1 b2 a1 a2"
|
||||
elif rule == InheritRule.NONE:
|
||||
assert answer == "b1 b2"
|
||||
elif rule == InheritRule.APPEND:
|
||||
assert answer == "a1 a2 b1 b2"
|
||||
elif rule == InheritRule.PREPEND:
|
||||
assert answer == "b1 b2 a1 a2"
|
||||
elif rule == InheritRule.NONE:
|
||||
assert answer == "b1 b2"
|
||||
elif rule == InheritRule.APPEND:
|
||||
assert answer == "a1 a2 b1 b2"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("rule", [InheritRule.PREPEND, InheritRule.NONE, InheritRule.APPEND])
|
||||
|
||||
Reference in New Issue
Block a user