summaryrefslogtreecommitdiff
path: root/tests/pyreverse/test_printer.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-14 19:37:49 +0200
committerGitHub <noreply@github.com>2022-04-14 19:37:49 +0200
commit8f872bf49c344d1d16b3573136d53b2cbda007c6 (patch)
treed203652d9d515b2a5d47cca6e1f7519a157d5990 /tests/pyreverse/test_printer.py
parentadf660a7300148a31cdb8bc25301bfd21af0602b (diff)
downloadpylint-git-8f872bf49c344d1d16b3573136d53b2cbda007c6.tar.gz
Use ``python-typing-update`` on half of the ``tests`` directory (#6317)
Diffstat (limited to 'tests/pyreverse/test_printer.py')
-rw-r--r--tests/pyreverse/test_printer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pyreverse/test_printer.py b/tests/pyreverse/test_printer.py
index 9128fc6dd..3822383db 100644
--- a/tests/pyreverse/test_printer.py
+++ b/tests/pyreverse/test_printer.py
@@ -2,7 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
-from typing import Type
+from __future__ import annotations
import pytest
from astroid import nodes
@@ -29,7 +29,7 @@ from pylint.pyreverse.vcg_printer import VCGPrinter
],
)
def test_explicit_layout(
- layout: Layout, printer_class: Type[Printer], expected_content: str, line_index: int
+ layout: Layout, printer_class: type[Printer], expected_content: str, line_index: int
) -> None:
printer = printer_class(title="unittest", layout=layout)
assert printer.lines[line_index].strip() == expected_content
@@ -39,7 +39,7 @@ def test_explicit_layout(
"layout, printer_class",
[(Layout.BOTTOM_TO_TOP, PlantUmlPrinter), (Layout.RIGHT_TO_LEFT, PlantUmlPrinter)],
)
-def test_unsupported_layout(layout: Layout, printer_class: Type[Printer]):
+def test_unsupported_layout(layout: Layout, printer_class: type[Printer]):
with pytest.raises(ValueError):
printer_class(title="unittest", layout=layout)