summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorAN Long <aisk@users.noreply.github.com>2023-11-03 04:06:51 (GMT)
committerGitHub <noreply@github.com>2023-11-03 04:06:51 (GMT)
commit3a1b09e6d070778d78d81084f88d37377d38ee9b (patch)
tree5efea6278e50c66ed62537fbf52105a6c477a734 /Lib/test/test_exceptions.py
parent93206d19a35106f64a1aef5fa25eb18966970534 (diff)
downloadcpython-3a1b09e6d070778d78d81084f88d37377d38ee9b.zip
cpython-3a1b09e6d070778d78d81084f88d37377d38ee9b.tar.gz
cpython-3a1b09e6d070778d78d81084f88d37377d38ee9b.tar.bz2
gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (#111655)
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 7f1d5ee..8ccf087 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -1844,6 +1844,13 @@ class NameErrorTests(unittest.TestCase):
self.assertIn("nonsense", err.getvalue())
self.assertIn("ZeroDivisionError", err.getvalue())
+ def test_gh_111654(self):
+ def f():
+ class TestClass:
+ TestClass
+
+ self.assertRaises(NameError, f)
+
# Note: name suggestion tests live in `test_traceback`.