Use the platform object itself as the interface

This commit is contained in:
Joe Rickerby
2023-04-10 22:20:04 +01:00
parent 26dd3f399e
commit ae0ac92167
7 changed files with 29 additions and 48 deletions
+3 -3
View File
@@ -85,9 +85,9 @@ def platform(request, monkeypatch):
def intercepted_build_args(monkeypatch):
intercepted = ArgsInterceptor()
monkeypatch.setattr(linux.interface, "build", intercepted)
monkeypatch.setattr(macos.interface, "build", intercepted)
monkeypatch.setattr(windows.interface, "build", intercepted)
monkeypatch.setattr(linux, "build", intercepted)
monkeypatch.setattr(macos, "build", intercepted)
monkeypatch.setattr(windows, "build", intercepted)
yield intercepted
+3 -3
View File
@@ -7,7 +7,7 @@ from pathlib import Path
import pytest
from cibuildwheel.__main__ import get_build_identifiers, get_platform_interface
from cibuildwheel.__main__ import get_build_identifiers, get_platform_module
from cibuildwheel.bashlex_eval import local_environment_executor
from cibuildwheel.environment import parse_environment
from cibuildwheel.options import (
@@ -49,9 +49,9 @@ def test_options_1(tmp_path, monkeypatch):
options = Options(platform="linux", command_line_arguments=args, env={})
interface = get_platform_interface("linux")
module = get_platform_module("linux")
identifiers = get_build_identifiers(
interface=interface,
platform_module=module,
build_selector=options.globals.build_selector,
architectures=options.globals.architectures,
)