[3.12] gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (GH-111655) (#111674)

(cherry picked from commit 3a1b09e6d0)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
This commit is contained in:
Jelle Zijlstra 2023-11-03 07:02:07 -07:00 committed by GitHub
parent 4db71c3ca7
commit 1a95ad68b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 286 additions and 281 deletions

View file

@ -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`.