Skip to content

Commit d080810

Browse files
authored
test_heroicutil: Implement test for is_heroic_launcher (#531)
1 parent 00d2bd8 commit d080810

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_heroicutil.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pytest
2+
3+
from pupgui2.constants import POSSIBLE_INSTALL_LOCATIONS
4+
5+
from pupgui2.heroicutil import *
6+
7+
KNOWN_HEROIC_LAUNCHERS = ['heroicwine', 'heroicproton']
8+
9+
@pytest.mark.parametrize('launcher, expected_heroic_launcher', [
10+
*[pytest.param(install_loc.get('launcher'), install_loc.get('launcher') in KNOWN_HEROIC_LAUNCHERS, id = install_loc.get('display_name')) for install_loc in POSSIBLE_INSTALL_LOCATIONS]
11+
])
12+
def test_is_heroic_launcher(launcher: str, expected_heroic_launcher: bool) -> None:
13+
14+
result: bool = is_heroic_launcher(launcher)
15+
16+
assert result == expected_heroic_launcher

0 commit comments

Comments
 (0)