mirror of
https://github.com/aclist/dztui.git
synced 2026-11-12 13:00:37 +01:00
chore: typehint tests
This commit is contained in:
1 parent
a5374d1f1a
commit
e29433b388
23 files changed
+170
-93
No files matched your search
@@ -1,14 +1,19 @@
|
||||
import pytest
|
||||
|
||||
from typing import Any, TYPE_CHECKING
|
||||
|
||||
from dzgui.const.constants import FLATPAK_RUN_CMD, STEAM_CMD
|
||||
from dzgui.controllers.mc import Controller
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"value, expected", [(FLATPAK_RUN_CMD, "Flatpak"), (STEAM_CMD, "Steam")]
|
||||
)
|
||||
def test_human_name(monkeypatch, value, expected) -> None:
|
||||
def mock_query_config(*args) -> str:
|
||||
def test_human_name(monkeypatch: "MonkeyPatch", value: str, expected: str) -> None:
|
||||
def mock_query_config(*args: Any) -> str:
|
||||
return value
|
||||
|
||||
monkeypatch.setattr(
|
||||
|
||||
Reference in new issue
Block a user