Skip to content

Commit 0540d05

Browse files
committed
fix: leaking value in tests
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 48e702f commit 0540d05

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

test/utils.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def cibuildwheel_run(
137137
return wheels
138138

139139

140-
def _floor_macosx_deployment_target(*args: str) -> str:
140+
def _floor_macosx(*args: str) -> str:
141141
"""
142142
Make sure a deployment target is not less than some value.
143143
"""
@@ -276,23 +276,19 @@ def expected_wheels(
276276

277277
elif platform == "macos":
278278
if machine_arch == "arm64":
279-
arm64_macosx_deployment_target = _floor_macosx_deployment_target(
280-
macosx_deployment_target, "11.0"
281-
)
282-
platform_tags = [f'macosx_{arm64_macosx_deployment_target.replace(".", "_")}_arm64']
279+
arm64_macosx = _floor_macosx(macosx_deployment_target, "11.0")
280+
platform_tags = [f'macosx_{arm64_macosx.replace(".", "_")}_arm64']
283281
else:
284282
if python_abi_tag.startswith("pp") and not python_abi_tag.startswith(
285283
("pp37", "pp38")
286284
):
287-
macosx_deployment_target = _floor_macosx_deployment_target(
288-
macosx_deployment_target, "10.15"
289-
)
285+
pypy_macosx = _floor_macosx(macosx_deployment_target, "10.15")
286+
platform_tags = [f'macosx_{pypy_macosx.replace(".", "_")}_x86_64']
290287
elif python_abi_tag.startswith("cp313"):
291-
macosx_deployment_target = _floor_macosx_deployment_target(
292-
macosx_deployment_target, "10.13"
293-
)
294-
295-
platform_tags = [f'macosx_{macosx_deployment_target.replace(".", "_")}_x86_64']
288+
pypy_macosx = _floor_macosx(macosx_deployment_target, "10.13")
289+
platform_tags = [f'macosx_{pypy_macosx.replace(".", "_")}_x86_64']
290+
else:
291+
platform_tags = [f'macosx_{macosx_deployment_target.replace(".", "_")}_x86_64']
296292

297293
if include_universal2:
298294
platform_tags.append(

0 commit comments

Comments
 (0)