File: test_WindowsSDK__properties.py

package info (click to toggle)
python-briefcase 0.3.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,300 kB
  • sloc: python: 59,405; makefile: 57
file content (28 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pytest

from briefcase.integrations.windows_sdk import WindowsSDK


@pytest.fixture
def windows_sdk(mock_tools, tmp_path):
    return WindowsSDK(
        mock_tools,
        root_path=tmp_path,
        version="10.0.19000.0",
        arch="x64",
    )


def test_managed_install(windows_sdk):
    """All Windows SDK installs are unmanaged."""
    assert windows_sdk.managed_install is False


@pytest.mark.parametrize("sdk_arch", ["x64", "arm64", "gothic"])
def test_paths(windows_sdk, tmp_path, sdk_arch):
    """Windows SDK paths are appropriate for arch and version."""
    windows_sdk.arch = sdk_arch

    expected_bin_path = tmp_path / "bin/10.0.19000.0" / sdk_arch
    assert windows_sdk.bin_path == expected_bin_path
    assert windows_sdk.signtool_exe == expected_bin_path / "signtool.exe"