def test_distribution_path(first_app_config, tmp_path): command = LinuxAppImageCreateCommand(base_path=tmp_path) # Force the architecture to x86_64 for test purposes. command.host_arch = "x86_64" distribution_path = command.distribution_path(first_app_config, "appimage") assert distribution_path == tmp_path / "linux" / "First_App-0.0.1-x86_64.AppImage"
def test_binary_path(first_app_config, tmp_path): command = LinuxAppImageCreateCommand(base_path=tmp_path) # Force the architecture to x86_64 for test purposes. command.host_arch = "x86_64" binary_path = command.binary_path(first_app_config) assert binary_path == tmp_path / "linux" / "First_App-0.0.1-x86_64.AppImage"
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)
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'), ]
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"), ]