Skip to content

Commit

Permalink
Update tests to account for added graalpy
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Jun 29, 2023
1 parent ace30fb commit 8a8ebd0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion unit_test/linux_build_steps_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_linux_container_split(tmp_path: Path, monkeypatch):
manylinux-x86_64-image = "normal_container_image"
manylinux-i686-image = "normal_container_image"
build = "*-manylinux_x86_64"
skip = "pp*"
skip = "[gp]p*"
archs = "x86_64 i686"
[[tool.cibuildwheel.overrides]]
Expand Down
35 changes: 26 additions & 9 deletions unit_test/option_prepare_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
from cibuildwheel import linux, util
from cibuildwheel.__main__ import main

ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"}
ALL_IDS = {
"cp36",
"cp37",
"cp38",
"cp39",
"cp310",
"cp311",
"pp37",
"pp38",
"pp39",
"pp310",
"gp230",
}


@pytest.fixture()
Expand Down Expand Up @@ -71,7 +83,7 @@ def test_build_default_launches(monkeypatch):
assert kwargs["container"]["simulate_32_bit"]

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS if "gp" not in x}

kwargs = build_in_container.call_args_list[2][1]
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
Expand All @@ -80,7 +92,7 @@ def test_build_default_launches(monkeypatch):

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {
f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x
f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x and "gp" not in x
}

kwargs = build_in_container.call_args_list[3][1]
Expand All @@ -89,7 +101,9 @@ def test_build_default_launches(monkeypatch):
assert kwargs["container"]["simulate_32_bit"]

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
assert identifiers == {
f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x and "gp" not in x
}


@pytest.mark.usefixtures("mock_build_container")
Expand Down Expand Up @@ -141,7 +155,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {
f"{x}-manylinux_x86_64"
for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"}
for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310", "gp230"}
}
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""

Expand All @@ -151,7 +165,8 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
assert not kwargs["container"]["simulate_32_bit"]
identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {
f"{x}-manylinux_x86_64" for x in ["cp310", "cp311", "pp37", "pp38", "pp39", "pp310"]
f"{x}-manylinux_x86_64"
for x in ["cp310", "cp311", "pp37", "pp38", "pp39", "pp310", "gp230"]
}

kwargs = build_in_container.call_args_list[3][1]
Expand All @@ -160,7 +175,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
assert kwargs["container"]["simulate_32_bit"]

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS if "gp" not in x}

kwargs = build_in_container.call_args_list[4][1]
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
Expand All @@ -169,7 +184,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path):

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {
f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x
f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x and "gp" not in x
}

kwargs = build_in_container.call_args_list[5][1]
Expand All @@ -178,4 +193,6 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
assert kwargs["container"]["simulate_32_bit"]

identifiers = {x.identifier for x in kwargs["platform_configs"]}
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
assert identifiers == {
f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x and "gp" not in x
}

0 comments on commit 8a8ebd0

Please sign in to comment.