From 95b688a6762a057f29737acd6ef28e6dfa58cc9d Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Wed, 30 Aug 2023 11:36:21 -0400 Subject: [PATCH] Add test for bad line break --- .../functional/class_diagrams/annotations/line_breaks.dot | 5 +++++ .../functional/class_diagrams/annotations/line_breaks.mmd | 4 ++++ .../functional/class_diagrams/annotations/line_breaks.puml | 6 ++++++ .../functional/class_diagrams/annotations/line_breaks.py | 5 +++++ .../functional/class_diagrams/annotations/line_breaks.rc | 2 ++ 5 files changed, 22 insertions(+) create mode 100644 tests/pyreverse/functional/class_diagrams/annotations/line_breaks.dot create mode 100644 tests/pyreverse/functional/class_diagrams/annotations/line_breaks.mmd create mode 100644 tests/pyreverse/functional/class_diagrams/annotations/line_breaks.puml create mode 100644 tests/pyreverse/functional/class_diagrams/annotations/line_breaks.py create mode 100644 tests/pyreverse/functional/class_diagrams/annotations/line_breaks.rc diff --git a/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.dot b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.dot new file mode 100644 index 0000000000..f5c42258f3 --- /dev/null +++ b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.dot @@ -0,0 +1,5 @@ +digraph "classes" { +rankdir=BT +charset="utf-8" +"line_breaks.A" [color="black", fontcolor="black", label=<{A|
|f(x: str | None)
}>, shape="record", style="solid"]; +} diff --git a/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.mmd b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.mmd new file mode 100644 index 0000000000..0abb8eeb76 --- /dev/null +++ b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.mmd @@ -0,0 +1,4 @@ +classDiagram + class A { + f(x: str | None)* + } diff --git a/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.puml b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.puml new file mode 100644 index 0000000000..1515ea001e --- /dev/null +++ b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.puml @@ -0,0 +1,6 @@ +@startuml classes +set namespaceSeparator none +class "A" as line_breaks.A { + {abstract}f(x: str | None) +} +@enduml diff --git a/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.py b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.py new file mode 100644 index 0000000000..2c084cebd2 --- /dev/null +++ b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.py @@ -0,0 +1,5 @@ +# OPEN BUG: https://github.com/pylint-dev/pylint/issues/8671 + +class A: + def f(self, x: str | None): + pass diff --git a/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.rc b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.rc new file mode 100644 index 0000000000..9e2ff3d953 --- /dev/null +++ b/tests/pyreverse/functional/class_diagrams/annotations/line_breaks.rc @@ -0,0 +1,2 @@ +[testoptions] +output_formats=mmd,dot,puml