def test_parse_platform(self): assert parse_platform("app-mac-0.1.0.tar.gz") == "mac" assert parse_platform("app-win-1.0.0.zip") == "win" assert parse_platform("Email Parser-mac-0.2.0.tar.gz") == "mac" assert parse_platform("Hangman-nix-0.0.1b1.zip") == "nix"
def test_parse_platform_fail(self): with pytest.raises(PackageHandlerError): parse_platform("app-nex-1.0.0.tar.gz")
def test_parse_platform(self): assert parse_platform('app-mac-0.1.0.tar.gz') == 'mac' assert parse_platform('app-win-1.0.0.zip') == 'win' assert parse_platform('Email Parser-mac-0.2.0.tar.gz') == 'mac' assert parse_platform('Hangman-nix-0.0.1b1.zip') == 'nix'