diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-09-08 14:24:39 +0100 |
---|---|---|
committer | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-09-09 17:21:48 +0100 |
commit | f5b293d0927506c2a979a091bf0d07ecc78fa181 (patch) | |
tree | 4de585b7cb6ed34da8237063752270189a730a41 /tests/test_cli_main.py | |
parent | cde0c6ee140bd108849bff40467d8f18ffc332ef (diff) | |
download | mlia-f5b293d0927506c2a979a091bf0d07ecc78fa181.tar.gz |
MLIA-386 Simplify typing in the source code
- Enable deferred annotations evaluation
- Use builtin types for type hints whenever possible
- Use | syntax for union types
- Rename mlia.core._typing into mlia.core.typing
Change-Id: I3f6ffc02fa069c589bdd9e8bddbccd504285427a
Diffstat (limited to 'tests/test_cli_main.py')
-rw-r--r-- | tests/test_cli_main.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_cli_main.py b/tests/test_cli_main.py index 28abc7b..78adc53 100644 --- a/tests/test_cli_main.py +++ b/tests/test_cli_main.py @@ -1,12 +1,13 @@ # SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """Tests for main module.""" +from __future__ import annotations + import argparse from functools import wraps from pathlib import Path from typing import Any from typing import Callable -from typing import List from unittest.mock import ANY from unittest.mock import call from unittest.mock import MagicMock @@ -252,7 +253,7 @@ def test_default_command(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> Non ], ) def test_commands_execution( - monkeypatch: pytest.MonkeyPatch, params: List[str], expected_call: Any + monkeypatch: pytest.MonkeyPatch, params: list[str], expected_call: Any ) -> None: """Test calling commands from the main function.""" mock = MagicMock() @@ -320,7 +321,7 @@ def test_verbose_output( capsys: pytest.CaptureFixture, verbose: bool, exc_mock: MagicMock, - expected_output: List[str], + expected_output: list[str], ) -> None: """Test flag --verbose.""" |