summaryrefslogtreecommitdiff
path: root/tests/testdata/python3/data
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-01-10 23:18:16 +0100
committerGitHub <noreply@github.com>2023-01-10 22:18:16 +0000
commit9eb8c47ddb6b48e14dbdb87bb1b02fcb580cb20d (patch)
treed653afb5983cf7a4338b491edc5c06650371ab05 /tests/testdata/python3/data
parent49691cc04f2d38b174787280f7ed38f818c828bd (diff)
downloadastroid-git-9eb8c47ddb6b48e14dbdb87bb1b02fcb580cb20d.tar.gz
Fix a regression in 2.13.2 where a ``RunTimeError`` could be raised unexpectedly (#1959)
* Add a unit test for broken __getattr__ in extension modules Co-authored-by: Florian Bruhin <me@the-compiler.org> Closes #1958
Diffstat (limited to 'tests/testdata/python3/data')
-rw-r--r--tests/testdata/python3/data/fake_module_with_broken_getattr.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/testdata/python3/data/fake_module_with_broken_getattr.py b/tests/testdata/python3/data/fake_module_with_broken_getattr.py
new file mode 100644
index 00000000..e860928e
--- /dev/null
+++ b/tests/testdata/python3/data/fake_module_with_broken_getattr.py
@@ -0,0 +1,7 @@
+class Broken:
+
+ def __getattr__(self, name):
+ raise Exception("boom")
+
+
+broken = Broken()