tests.test_manager_protonplus moduleΒΆ

Tests for the ProtonPlus inventory and command construction.

The inventory is read from the .protonplus records ProtonPlus writes, laid out here under a scratch home, so these tests neither need protonplus nor touch the real machine. The records are the ones ProtonPlus 0.6.8 wrote on Solus for DXVK (doitsujin) on Lutris.

tests.test_manager_protonplus.PINNED = '{"runner_endpoint":"https://api.github.com/repos/doitsujin/dxvk/releases","runner_title":"DXVK (doitsujin)","tag":"v3.1","provider_id":"dxvk-doitsujin","tool_id":"lutris-system/dxvk/dxvk-doitsujin","launcher_id":"lutris-system","variant_id":"standard","release_id":"357524779"}'ΒΆ

The record of protonplus install lutris-system dxvk-doitsujin at v3.1.

tests.test_manager_protonplus.ROLLING = '{"runner_endpoint":"https://api.github.com/repos/doitsujin/dxvk/releases","runner_title":"DXVK (doitsujin)","tag":"v3.1.1","provider_id":"dxvk-doitsujin","tool_id":"lutris-system/dxvk/dxvk-doitsujin","launcher_id":"lutris-system","variant_id":"standard","release_id":"381956359"}'ΒΆ

The record of protonplus install lutris-system dxvk-doitsujin latest.

tests.test_manager_protonplus.home(tmp_path, monkeypatch)[source]ΒΆ

A scratch home, with the XDG base directories left to their defaults.

pathlib.Path.home() reads HOME on POSIX and USERPROFILE on Windows.

tests.test_manager_protonplus.write_record(release_dir, content)[source]ΒΆ
Return type:

None

tests.test_manager_protonplus.inventory()[source]ΒΆ
Return type:

list[tuple[str, str]]

tests.test_manager_protonplus.test_installed_lists_a_runner_once_at_its_newest(home)[source]ΒΆ
tests.test_manager_protonplus.test_installed_reads_a_symlinked_launcher_once(home)[source]ΒΆ

Each record is read once, although three launcher paths reach it.

With the XDG base directories at their defaults, $XDG_DATA_HOME/lutris and ~/.local/share/lutris are one directory, and the Flatpak one links to it.

tests.test_manager_protonplus.test_installed_honors_xdg_data_home(home, monkeypatch)[source]ΒΆ
tests.test_manager_protonplus.test_installed_skips_an_unaddressable_record(home, content)[source]ΒΆ
tests.test_manager_protonplus.test_commands_split_the_package_id(monkeypatch)[source]ΒΆ

The ID splits into two arguments, which the docstring corpus cannot check.