summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorAndreas Finkler <3929834+DudeNr33@users.noreply.github.com>2021-08-14 21:34:00 +0200
committerGitHub <noreply@github.com>2021-08-14 21:34:00 +0200
commit4da3862f492f017be3149a5b89f365335f0bf746 (patch)
tree8c6c3622232b22c79280dca66c8c4e5f02262ad5 /tests/data
parentf2cd986da07c12e81dd411e4b1190386a6cad750 (diff)
downloadpylint-git-4da3862f492f017be3149a5b89f365335f0bf746.tar.gz
``pyreverse``: add PlantUML output (#4846)
* Extract helper method to get annotated arguments into ``Printer`` base class. * Add ``Printer`` subclass for PlantUML output * Add functional test for ``PlantUmlPrinter`` * Add tests for specific layout for ``PlantUmlPrinter`` * Extract test helper function to remove code duplication * Add new test class to check type annotations * Cleanup generated .puml files after tests finished * Create a factory function to get the correct ``Printer`` class for a given filetype. * Fix unittest after adding a new class to the test data. * Add changelog and whatsnew entry * Add "plantuml" as possible extension for PlantUML output
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/suppliermodule_test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/data/suppliermodule_test.py b/tests/data/suppliermodule_test.py
index 6af30fa08..add637d4a 100644
--- a/tests/data/suppliermodule_test.py
+++ b/tests/data/suppliermodule_test.py
@@ -7,6 +7,16 @@ class Interface:
def set_value(self, value):
raise NotImplementedError
+class CustomException(Exception): pass
+
class DoNothing: pass
class DoNothing2: pass
+
+class DoSomething:
+ def __init__(self, a_string: str, optional_int: int = None):
+ self.my_string = a_string
+ self.my_int = optional_int
+
+ def do_it(self, new_int: int) -> int:
+ return self.my_int + new_int