mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-132775: Add _PyCode_GetXIData() (gh-133475)
This commit is contained in:
parent
e9616110aa
commit
ea598730ef
6 changed files with 116 additions and 6 deletions
|
@ -687,6 +687,16 @@ class CodeTest(unittest.TestCase):
|
|||
'checks': CO_FAST_LOCAL,
|
||||
'res': CO_FAST_LOCAL,
|
||||
},
|
||||
defs.spam_args_attrs_and_builtins: {
|
||||
'a': POSONLY,
|
||||
'b': POSONLY,
|
||||
'c': POSORKW,
|
||||
'd': POSORKW,
|
||||
'e': KWONLY,
|
||||
'f': KWONLY,
|
||||
'args': VARARGS,
|
||||
'kwargs': VARKWARGS,
|
||||
},
|
||||
defs.spam_returns_arg: {
|
||||
'x': POSORKW,
|
||||
},
|
||||
|
@ -697,6 +707,11 @@ class CodeTest(unittest.TestCase):
|
|||
'x': CO_FAST_CELL,
|
||||
'eggs': CO_FAST_LOCAL,
|
||||
},
|
||||
defs.spam_annotated: {
|
||||
'a': POSORKW,
|
||||
'b': POSORKW,
|
||||
'c': POSORKW,
|
||||
},
|
||||
defs.spam_full: {
|
||||
'a': POSONLY,
|
||||
'b': POSONLY,
|
||||
|
@ -892,6 +907,14 @@ class CodeTest(unittest.TestCase):
|
|||
purelocals=5,
|
||||
globalvars=6,
|
||||
),
|
||||
defs.spam_args_attrs_and_builtins: new_var_counts(
|
||||
posonly=2,
|
||||
posorkw=2,
|
||||
kwonly=2,
|
||||
varargs=1,
|
||||
varkwargs=1,
|
||||
attrs=1,
|
||||
),
|
||||
defs.spam_returns_arg: new_var_counts(
|
||||
posorkw=1,
|
||||
),
|
||||
|
@ -902,6 +925,9 @@ class CodeTest(unittest.TestCase):
|
|||
othercells=1,
|
||||
purelocals=1,
|
||||
),
|
||||
defs.spam_annotated: new_var_counts(
|
||||
posorkw=3,
|
||||
),
|
||||
defs.spam_full: new_var_counts(
|
||||
posonly=2,
|
||||
posorkw=2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue