diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-06-13 23:14:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-13 23:14:00 (GMT) |
commit | f77a911c526442871ba66f01b31b8f497daf70eb (patch) | |
tree | f6a1ce32c1f7c955ed2dd5b63ed70431709bdb33 /Lib/test/test_code.py | |
parent | d851f8e258c7328814943e923a7df81bca15df4b (diff) | |
download | cpython-f77a911c526442871ba66f01b31b8f497daf70eb.zip cpython-f77a911c526442871ba66f01b31b8f497daf70eb.tar.gz cpython-f77a911c526442871ba66f01b31b8f497daf70eb.tar.bz2 |
[3.14] gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh-135493)
(cherry picked from commit 56eabea, AKA gh-135438)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Diffstat (limited to 'Lib/test/test_code.py')
-rw-r--r-- | Lib/test/test_code.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py index 9fc2b04..655f5a9 100644 --- a/Lib/test/test_code.py +++ b/Lib/test/test_code.py @@ -701,6 +701,7 @@ class CodeTest(unittest.TestCase): 'checks': CO_FAST_LOCAL, 'res': CO_FAST_LOCAL, }, + defs.spam_with_global_and_attr_same_name: {}, defs.spam_full_args: { 'a': POSONLY, 'b': POSONLY, @@ -955,6 +956,10 @@ class CodeTest(unittest.TestCase): purelocals=5, globalvars=6, ), + defs.spam_with_global_and_attr_same_name: new_var_counts( + globalvars=2, + attrs=1, + ), defs.spam_full_args: new_var_counts( posonly=2, posorkw=2, |