diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2023-11-03 14:02:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 14:02:07 (GMT) |
commit | 1a95ad68b4156fbd04bd5c479f3ef9ca30f0a8f5 (patch) | |
tree | b79a4f12f62e5ea60cc4c1b6f48e381ede42b344 /Lib/test/test_exceptions.py | |
parent | 4db71c3ca7ba6c290ebdf54452ff0ccca0a174af (diff) | |
download | cpython-1a95ad68b4156fbd04bd5c479f3ef9ca30f0a8f5.zip cpython-1a95ad68b4156fbd04bd5c479f3ef9ca30f0a8f5.tar.gz cpython-1a95ad68b4156fbd04bd5c479f3ef9ca30f0a8f5.tar.bz2 |
[3.12] gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (GH-111655) (#111674)
(cherry picked from commit 3a1b09e6d070778d78d81084f88d37377d38ee9b)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 3049015..ad0b7c2 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1824,6 +1824,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`. |