File: test_desktop_install.py

package info (click to toggle)
protontricks 1.13.1%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 716 kB
  • sloc: python: 5,237; sh: 247; xml: 68; makefile: 9
file content (15 lines) | stat: -rw-r--r-- 551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def test_run_desktop_install(home_dir, command_mock, desktop_install_cli):
    """
    Ensure that `desktop-file-install` is called properly
    """
    # `protontricks-desktop-install` takes no arguments
    desktop_install_cli([])

    command = command_mock.commands[0]
    assert command.args[0:3] == [
        "desktop-file-install",
        "--dir",
        str(home_dir / ".local" / "share" / "applications")
    ]
    assert command.args[3].endswith("/protontricks.desktop")
    assert command.args[4].endswith("/protontricks-launch.desktop")