diff options
Diffstat (limited to 'tests/pyreverse/test_printer.py')
-rw-r--r-- | tests/pyreverse/test_printer.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pyreverse/test_printer.py b/tests/pyreverse/test_printer.py index 6d240c836..5406c6e83 100644 --- a/tests/pyreverse/test_printer.py +++ b/tests/pyreverse/test_printer.py @@ -8,6 +8,7 @@ from typing import Type import pytest +from astroid import nodes from pylint.pyreverse.dot_printer import DotPrinter from pylint.pyreverse.plantuml_printer import PlantUmlPrinter @@ -46,6 +47,15 @@ def test_unsupported_layout(layout: Layout, printer_class: Type[Printer]): printer_class(title="unittest", layout=layout) +def test_method_arguments_none(): + func = nodes.FunctionDef() + args = nodes.Arguments() + args.args = None + func.postinit(args, body=None) + parsed_args = Printer._get_method_arguments(func) + assert parsed_args == [] + + class TestPlantUmlPrinter: printer = PlantUmlPrinter(title="unittest", layout=Layout.TOP_TO_BOTTOM) |