How to use the protontricks.gui.select_steam_app_with_gui function in protontricks

To help you get started, we’ve selected a few protontricks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Matoking / protontricks / tests / test_gui.py View on Github external
def test_select_game_no_choice(self, zenity, steam_app_factory):
        """
        Try choosing a game but make no choice
        """
        steam_apps = [steam_app_factory(name="Fake game 1", appid=10)]

        # Fake user doesn't select any game
        zenity.mock_stdout = ""

        with pytest.raises(SystemExit) as exc:
            select_steam_app_with_gui(steam_apps=steam_apps)

        assert exc.value.code == 0
github Matoking / protontricks / tests / test_gui.py View on Github external
def test_select_game_broken_zenity(self, broken_zenity, steam_app_factory):
        """
        Try choosing a game with a broken Zenity executable that
        prints a specific error message that Protontricks knows how to ignore
        """
        steam_apps = [
            steam_app_factory(name="Fake game 1", appid=10),
            steam_app_factory(name="Fake game 2", appid=20)
        ]

        # Fake user selecting 'Fake game 2'
        broken_zenity.mock_stdout = "Fake game 2: 20"
        steam_app = select_steam_app_with_gui(steam_apps=steam_apps)

        assert steam_app == steam_apps[1]
github Matoking / protontricks / tests / test_gui.py View on Github external
def test_select_game(self, zenity, steam_app_factory):
        """
        Select a game using the GUI
        """
        steam_apps = [
            steam_app_factory(name="Fake game 1", appid=10),
            steam_app_factory(name="Fake game 2", appid=20)
        ]

        # Fake user selecting 'Fake game 2'
        zenity.mock_stdout = "Fake game 2: 20"
        steam_app = select_steam_app_with_gui(steam_apps=steam_apps)

        assert steam_app == steam_apps[1]

protontricks

A simple wrapper for running Winetricks commands for Proton-enabled games.

GPL-3.0
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis

Similar packages