aboutsummaryrefslogtreecommitdiff
path: root/tests/test_devices_ethosu_reporters.py
diff options
context:
space:
mode:
authorDmitrii Agibov <dmitrii.agibov@arm.com>2022-09-08 14:24:39 +0100
committerDmitrii Agibov <dmitrii.agibov@arm.com>2022-09-09 17:21:48 +0100
commitf5b293d0927506c2a979a091bf0d07ecc78fa181 (patch)
tree4de585b7cb6ed34da8237063752270189a730a41 /tests/test_devices_ethosu_reporters.py
parentcde0c6ee140bd108849bff40467d8f18ffc332ef (diff)
downloadmlia-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_devices_ethosu_reporters.py')
-rw-r--r--tests/test_devices_ethosu_reporters.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_devices_ethosu_reporters.py b/tests/test_devices_ethosu_reporters.py
index a63db1c..f8a7d86 100644
--- a/tests/test_devices_ethosu_reporters.py
+++ b/tests/test_devices_ethosu_reporters.py
@@ -1,14 +1,14 @@
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Tests for reports module."""
+from __future__ import annotations
+
import json
import sys
from contextlib import ExitStack as doesnt_raise
from pathlib import Path
from typing import Any
from typing import Callable
-from typing import Dict
-from typing import List
from typing import Literal
import pytest
@@ -91,7 +91,7 @@ from mlia.utils.console import remove_ascii_codes
)
def test_report(
data: Any,
- formatters: List[Callable],
+ formatters: list[Callable],
fmt: Literal["plain_text", "json", "csv"],
output: Any,
expected_error: Any,
@@ -202,10 +202,10 @@ Operators:
],
)
def test_report_operators(
- ops: List[Operator],
+ ops: list[Operator],
expected_plain_text: str,
- expected_json_dict: Dict,
- expected_csv_list: List,
+ expected_json_dict: dict,
+ expected_csv_list: list,
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""Test report_operatos formatter."""
@@ -380,8 +380,8 @@ def test_report_operators(
def test_report_device_details(
device: EthosUConfiguration,
expected_plain_text: str,
- expected_json_dict: Dict,
- expected_csv_list: List,
+ expected_json_dict: dict,
+ expected_csv_list: list,
) -> None:
"""Test report_operatos formatter."""
report = report_device_details(device)