-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #820 from pypa/test-818
Add test for #818
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import pytest | ||
|
||
from . import test_projects, utils | ||
|
||
basic_project = test_projects.new_c_project() | ||
|
||
|
||
def test_wheel_tag_is_correct_when_using_macosx_deployment_target(tmp_path): | ||
if utils.platform != "macos": | ||
pytest.skip("This test is only relevant to MACOSX_DEPLOYMENT_TARGET") | ||
|
||
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) |