Skip to content

Commit 643b41b

Browse files
committed
Fixes post-merge
1 parent 82b7de6 commit 643b41b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/test_ios.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def test_empty_xbuild_tool_definition(tmp_path, capfd):
220220
@pytest.mark.serial
221221
def test_ios_test_command_without_python_dash_m(tmp_path, capfd):
222222
"""pytest should be able to run without python -m, but it should warn."""
223-
if utils.platform != "macos":
223+
if utils.get_platform() != "macos":
224224
pytest.skip("this test can only run on macOS")
225225
if utils.get_xcode_version() < (13, 0):
226226
pytest.skip("this test only works with Xcode 13.0 or greater")
@@ -261,7 +261,7 @@ def test_spam():
261261

262262
def test_ios_test_command_invalid(tmp_path, capfd):
263263
"""Test command should raise an error if it's clearly invalid."""
264-
if utils.platform != "macos":
264+
if utils.get_platform() != "macos":
265265
pytest.skip("this test can only run on macOS")
266266
if utils.get_xcode_version() < (13, 0):
267267
pytest.skip("this test only works with Xcode 13.0 or greater")

test/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def expected_wheels(
170170
macosx_deployment_target: str | None = None,
171171
iphoneos_deployment_target: str | None = None,
172172
machine_arch: str | None = None,
173-
platform: str = platform,
173+
platform: str | None = None,
174174
python_abi_tags: list[str] | None = None,
175175
include_universal2: bool = False,
176176
single_python: bool = False,
@@ -179,9 +179,11 @@ def expected_wheels(
179179
"""
180180
Returns the expected wheels from a run of cibuildwheel.
181181
"""
182+
platform = platform or get_platform()
183+
182184
if machine_arch is None:
183185
machine_arch = pm.machine()
184-
if get_platform() == "linux":
186+
if platform == "linux":
185187
machine_arch = arch_name_for_linux(machine_arch)
186188

187189
if macosx_deployment_target is None:
@@ -192,7 +194,7 @@ def expected_wheels(
192194

193195
architectures = [machine_arch]
194196
if not single_arch:
195-
if get_platform() == "linux":
197+
if platform == "linux":
196198
if machine_arch == "x86_64":
197199
architectures.append("i686")
198200
elif (
@@ -201,7 +203,7 @@ def expected_wheels(
201203
and _AARCH64_CAN_RUN_ARMV7
202204
):
203205
architectures.append("armv7l")
204-
elif get_platform() == "windows" and machine_arch == "AMD64":
206+
elif platform == "windows" and machine_arch == "AMD64":
205207
architectures.append("x86")
206208

207209
return [
@@ -239,8 +241,6 @@ def _expected_wheels(
239241
"""
240242
Returns a list of expected wheels from a run of cibuildwheel.
241243
"""
242-
platform = get_platform()
243-
244244
# per PEP 425 (https://www.python.org/dev/peps/pep-0425/), wheel files shall have name of the form
245245
# {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl
246246
# {python tag} and {abi tag} are closely related to the python interpreter used to build the wheel

0 commit comments

Comments
 (0)