summaryrefslogtreecommitdiff
path: root/tests/extensions
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-05-31 16:12:49 -0400
committerGitHub <noreply@github.com>2022-05-31 22:12:49 +0200
commitbd33f79b69bef522fd8d0790d215213954a82707 (patch)
tree00bf523bdd6a9841c31d1a2e80a76d83426574af /tests/extensions
parentfa416c3f2461fb771c17ebd9414c9ff6f6ebc15b (diff)
downloadpylint-git-bd33f79b69bef522fd8d0790d215213954a82707.tar.gz
Fix a crash in the ``docparams`` extension when raising the result of a function (#6767)
Diffstat (limited to 'tests/extensions')
-rw-r--r--tests/extensions/test_check_docs_utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/extensions/test_check_docs_utils.py b/tests/extensions/test_check_docs_utils.py
index b14138a92..3e70ffbfd 100644
--- a/tests/extensions/test_check_docs_utils.py
+++ b/tests/extensions/test_check_docs_utils.py
@@ -139,3 +139,14 @@ def test_exception(raise_node, expected):
for node in found_nodes:
assert isinstance(node, astroid.nodes.ClassDef)
assert {node.name for node in found_nodes} == expected
+
+
+def test_possible_exc_types_raising_potential_none() -> None:
+ raise_node = astroid.extract_node(
+ """
+ def a():
+ return
+ raise a() #@
+ """
+ )
+ assert utils.possible_exc_types(raise_node) == set()