Example #1
0
def test_support_package_url(first_app_config, tmp_path):
    command = WindowsMSICreateCommand(base_path=tmp_path)

    # Set some properties of the host system for test purposes.
    command.host_arch = 'wonky'
    command.platform = 'tester'

    # This test result assumes we're on ARM64. However, we will be
    # on almost every Windows box (and definite will be in CI)
    assert command.support_package_url_query == [
        ('platform', 'tester'),
        ('version', '3.{minor}'.format(minor=sys.version_info.minor)),
        ('arch', 'amd64'),
    ]
Example #2
0
def test_support_package_url(first_app_config, tmp_path):
    command = WindowsMSICreateCommand(base_path=tmp_path)

    # Set some properties of the host system for test purposes.
    command.host_arch = 'wonky'
    command.platform = 'tester'

    # This test result is dependent on whether we're using a 32-bit (win32)
    # or 64-bit (amd64) machine.
    arch = "amd64" if sys.maxsize.bit_length() == 63 else "win32"
    assert command.support_package_url_query == [
        ('platform', 'tester'),
        ('version', '3.{minor}'.format(minor=sys.version_info.minor)),
        ('arch', arch),
    ]
Example #3
0
def test_support_package_url(first_app_config, tmp_path):
    command = WindowsMSICreateCommand(base_path=tmp_path)

    # Set some properties of the host system for test purposes.
    command.host_arch = "wonky"
    command.platform = "tester"

    # This test result is dependent on whether we're using a 32-bit (win32)
    # or 64-bit (amd64) machine.
    arch = "amd64" if sys.maxsize.bit_length() == 63 else "win32"
    assert command.support_package_url_query == [
        ("platform", "tester"),
        ("version", f"3.{sys.version_info.minor}"),
        ("arch", arch),
    ]