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,12 +1,17 @@
|
||||
import pytest
|
||||
import tempfile
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pathlib import Path
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
|
||||
from dzgui.api.shortcuts import Shortcuts
|
||||
from tests.fixtures import fixture_path
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
|
||||
pytestmark = pytest.mark.apitest
|
||||
|
||||
|
||||
@@ -22,13 +27,13 @@ def patch_api() -> None:
|
||||
mp.undo()
|
||||
|
||||
|
||||
def test_no_shortcuts(monkeypatch) -> None:
|
||||
def test_no_shortcuts(monkeypatch: "MonkeyPatch") -> None:
|
||||
s = Shortcuts(Path(""))
|
||||
assert len(s.shortcuts["shortcuts"]) == 0
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def dummy_app() -> None:
|
||||
def dummy_app() -> dict[str, str]:
|
||||
d = {
|
||||
"AppName": "TEST APP",
|
||||
"StartDir": "TEST_DIR",
|
||||
|
||||
Reference in new issue
Block a user