示例#1
0
def test_host(first_app_config, tmp_path):
    command = LinuxAppImageCreateCommand(base_path=tmp_path)

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

    assert command.support_package_key_prefix == 'python/3.{minor}/tester/wonky/'.format(
        minor=sys.version_info.minor)
示例#2
0
def test_support_package_url(first_app_config, tmp_path):
    command = LinuxAppImageCreateCommand(base_path=tmp_path)

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

    assert command.support_package_url_query == [
        ('platform', 'tester'),
        ('version', '3.{minor}'.format(minor=sys.version_info.minor)),
        ('arch', 'wonky'),
    ]
示例#3
0
def test_support_package_url(first_app_config, tmp_path):
    command = LinuxAppImageCreateCommand(base_path=tmp_path)

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

    assert command.support_package_url_query == [
        ("platform", "tester"),
        ("version", f"3.{sys.version_info.minor}"),
        ("arch", "wonky"),
    ]