Skip to content

Commit 7c73ec2

Browse files
committed
Responses to code review from @freakboy3742
1 parent 36f5d7b commit 7c73ec2

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

test/test_ios.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ def test_no_xbuild_tool_definition(tmp_path, capfd):
171171

172172
# The expected wheels were produced.
173173
expected_wheels = utils.expected_wheels(
174-
"spam", "0.1.0", platform="ios", python_abi_tags=["cp313-cp313"]
174+
"spam",
175+
"0.1.0",
176+
platform="ios",
177+
python_abi_tags=["cp313-cp313"],
175178
)
176179
assert set(actual_wheels) == set(expected_wheels)
177180

@@ -214,6 +217,7 @@ def test_empty_xbuild_tool_definition(tmp_path, capfd):
214217
assert "Your project configuration does not define any cross-build tools." not in captured.err
215218

216219

220+
@pytest.mark.serial
217221
def test_ios_test_command_without_python_dash_m(tmp_path, capfd):
218222
"""pytest should be able to run without python -m, but it should warn."""
219223
if utils.platform != "macos":

test/utils.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def expected_wheels(
157157
package_version: str,
158158
manylinux_versions: list[str] | None = None,
159159
musllinux_versions: list[str] | None = None,
160-
macosx_deployment_target: str = "10.9",
161-
iphoneos_deployment_target: str = "13.0",
160+
macosx_deployment_target: str | None = None,
161+
iphoneos_deployment_target: str | None = None,
162162
machine_arch: str | None = None,
163163
platform: str = platform,
164164
python_abi_tags: list[str] | None = None,
@@ -174,6 +174,12 @@ def expected_wheels(
174174
if platform == "linux":
175175
machine_arch = arch_name_for_linux(machine_arch)
176176

177+
if macosx_deployment_target is None:
178+
macosx_deployment_target = os.environ.get("MACOSX_DEPLOYMENT_TARGET", "10.9")
179+
180+
if iphoneos_deployment_target is None:
181+
iphoneos_deployment_target = os.environ.get("IPHONEOS_DEPLOYMENT_TARGET", "13.0")
182+
177183
architectures = [machine_arch]
178184
if not single_arch:
179185
if platform == "linux":

0 commit comments

Comments
 (0)