diff --git a/tests/conftest.py b/tests/conftest.py index 1572fb9..b7d1a9c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -72,7 +72,7 @@ def study_assets( AssetNotFoundError: If the study or expected study assets are not found in the resource directory. """ - module_path = Path(request.fspath) + module_path = Path(request.fspath) # type: ignore assets_dir = module_path.parent.joinpath(module_path.stem.replace("test_", "")) asset_dir = assets_dir.joinpath(request.node.name.replace("test_", "")) zip_files = list(asset_dir.glob("*.zip")) diff --git a/tests/helpers.py b/tests/helpers.py index 9a2946a..df8010a 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -5,7 +5,7 @@ DEFAULT_IGNORES = frozenset(filecmp.DEFAULT_IGNORES) | {"study.ico"} -def are_same_dir(dir1: Path, dir2: Path, *, ignore: t.Sequence[str] = DEFAULT_IGNORES) -> bool: +def are_same_dir(dir1: Path, dir2: Path, *, ignore: t.Collection[str] = DEFAULT_IGNORES) -> bool: """ Compare two directories recursively. """ diff --git a/tests/show_app/test_show_app.py b/tests/show_app/test_show_app.py index 105a22b..1476b0f 100644 --- a/tests/show_app/test_show_app.py +++ b/tests/show_app/test_show_app.py @@ -1,10 +1,14 @@ import dataclasses import datetime +import typing as t from pathlib import Path from antares.study.version.show_app import ShowApp from antares.study.version.upgrade_app import scenarios +if t.TYPE_CHECKING: + from antares.study.version import StudyVersion + STUDY_ANTARES_FILE_0600 = """\ [antares] caption = Thermal fleet optimization @@ -31,7 +35,7 @@ def test_study_antares(self, study_dir: Path) -> None: def test_available_upgrades(self, study_dir: Path) -> None: app = ShowApp(study_dir) actual = app.available_upgrades - expected = [] + expected: t.List[StudyVersion] = [] assert actual == expected # patch version