From 14c83f1b9b92b51508308417602e674b81e6dd28 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 9 Sep 2021 15:28:10 +0100 Subject: [PATCH] Add test for #818 --- test/test_wheel_tag.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/test_wheel_tag.py diff --git a/test/test_wheel_tag.py b/test/test_wheel_tag.py new file mode 100644 index 000000000..ccfb2d3d3 --- /dev/null +++ b/test/test_wheel_tag.py @@ -0,0 +1,34 @@ +import pytest + +from . import test_projects, utils + +basic_project = test_projects.new_c_project() + + +@pytest.mark.xfail(strict=True) +def test(tmp_path): + if utils.platform != "macos": + pytest.skip() + project_dir = tmp_path / "project" + basic_project.generate(project_dir) + + # build the wheels + deployment_target = "10.11" + actual_wheels = utils.cibuildwheel_run( + project_dir, + add_env={ + "CIBW_BUILD": "cp39-*", + "MACOSX_DEPLOYMENT_TARGET": deployment_target, + }, + ) + + # check that the expected wheels are produced + expected_wheels = utils.expected_wheels( + "spam", "0.1.0", macosx_deployment_target=deployment_target + ) + expected_wheels = [w for w in expected_wheels if "cp39" in w] + + print("actual_wheels", actual_wheels) + print("expected_wheels", expected_wheels) + + assert set(actual_wheels) == set(expected_wheels)