+
    Bi9                        R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	 ^ RI
t
^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHtHt ^ RIHt  ^ RIt^ RIH t! ]R,          t"R	 t#R
 t$R t% ! R R]PL                  4      t'R t( ! R R]PL                  4      t) ! R R]PL                  4      t*R t+R t,R t-R t.R t/]0! 4       3R lt1R t2R t3R t4 ! R R]PL                  4      t5]! RR7      '       Ed   ]
Ee   ]
Pl                  t7]
Pp                  ! R]
Pr                  4      t:]7Pv                  t<]:3]<n=        ]
P|                  ]<n?        ]7P                  tA]
P                  ]
P|                  ]
Pr                  3]An=        ]
P                  ]An?        ]7P                  tE]
P                  ]
P|                  ]
P                  ! ]
Pr                  4      3]En=        ]
P                  ]En?        RsGR  tH]:! ]H4      tI]<! ]I4      tJ ! R! R"]PL                  4      tKR# tL]MR$8X  d   ]P                  ! 4        R# R#   ] d    Rt
 ELi ; i  ] d    Rt ELi ; i)%a  This module includes tests of the code object representation.

>>> def f(x):
...     def g(y):
...         return x + y
...     return g
...

>>> dump(f.__code__)
name: f
argcount: 1
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ('x', 'g')
cellvars: ('x',)
freevars: ()
nlocals: 2
flags: 3
consts: ('<code object g>',)

>>> dump(f(4).__code__)
name: g
argcount: 1
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ('y',)
cellvars: ()
freevars: ('x',)
nlocals: 1
flags: 19
consts: ('None',)

>>> def h(x, y):
...     a = x + y
...     b = x - y
...     c = a * b
...     return c
...

>>> dump(h.__code__)
name: h
argcount: 2
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ('x', 'y', 'a', 'b', 'c')
cellvars: ()
freevars: ()
nlocals: 5
flags: 3
consts: ('None',)

>>> def attrs(obj):
...     print(obj.attr1)
...     print(obj.attr2)
...     print(obj.attr3)

>>> dump(attrs.__code__)
name: attrs
argcount: 1
posonlyargcount: 0
kwonlyargcount: 0
names: ('print', 'attr1', 'attr2', 'attr3')
varnames: ('obj',)
cellvars: ()
freevars: ()
nlocals: 1
flags: 3
consts: ('None',)

>>> def optimize_away():
...     'doc string'
...     'not a docstring'
...     53
...     0x53

>>> dump(optimize_away.__code__)
name: optimize_away
argcount: 0
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ()
cellvars: ()
freevars: ()
nlocals: 0
flags: 67108867
consts: ("'doc string'", 'None')

>>> def keywordonly_args(a,b,*,k1):
...     return a,b,k1
...

>>> dump(keywordonly_args.__code__)
name: keywordonly_args
argcount: 2
posonlyargcount: 0
kwonlyargcount: 1
names: ()
varnames: ('a', 'b', 'k1')
cellvars: ()
freevars: ()
nlocals: 3
flags: 3
consts: ('None',)

>>> def posonly_args(a,b,/,c):
...     return a,b,c
...

>>> dump(posonly_args.__code__)
name: posonly_args
argcount: 3
posonlyargcount: 2
kwonlyargcount: 0
names: ()
varnames: ('a', 'b', 'c')
cellvars: ()
freevars: ()
nlocals: 3
flags: 3
consts: ('None',)

>>> def has_docstring(x: str):
...     'This is a one-line doc string'
...     x += x
...     x += "hello world"
...     # co_flags should be 0x4000003 = 67108867
...     return x

>>> dump(has_docstring.__code__)
name: has_docstring
argcount: 1
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ('x',)
cellvars: ()
freevars: ()
nlocals: 1
flags: 67108867
consts: ("'This is a one-line doc string'", "'hello world'")

>>> async def async_func_docstring(x: str, y: str):
...     "This is a docstring from async function"
...     import asyncio
...     await asyncio.sleep(1)
...     # co_flags should be 0x4000083 = 67108995
...     return x + y

>>> dump(async_func_docstring.__code__)
name: async_func_docstring
argcount: 2
posonlyargcount: 0
kwonlyargcount: 0
names: ('asyncio', 'sleep')
varnames: ('x', 'y', 'asyncio')
cellvars: ()
freevars: ()
nlocals: 3
flags: 67108995
consts: ("'This is a docstring from async function'", 'None')

>>> def no_docstring(x, y, z):
...     return x + "hello" + y + z + "world"

>>> dump(no_docstring.__code__)
name: no_docstring
argcount: 3
posonlyargcount: 0
kwonlyargcount: 0
names: ()
varnames: ('x', 'y', 'z')
cellvars: ()
freevars: ()
nlocals: 3
flags: 3
consts: ("'hello'", "'world'")

>>> class class_with_docstring:
...     '''This is a docstring for class'''
...     '''This line is not docstring'''
...     pass

>>> print(class_with_docstring.__doc__)
This is a docstring for class

>>> class class_without_docstring:
...     pass

>>> print(class_without_docstring.__doc__)
None
N)cpython_onlycheck_impl_detailrequires_debug_ranges
gc_collectPy_GIL_DISABLED)assert_python_ok)threading_helperimport_helper)instructions_with_positions)opmapopname)code_offset_to_lineCOPY_FREE_VARSc              #     "   V  F@  p\        V4      pVP                  R4      '       d   RVP                  ,          x  K<  Vx  KB  	  R# 5i)z.Yield a doctest-safe sequence of object reprs.z<code objectz<code object %s>N)repr
startswithco_name)teltrs   &  %/usr/lib/python3.14/test/test_code.pyconstsr      s;     I<<''$s{{22G s   A	Ac           
         R F&  p\        V: R\        V RV,           4      : 24       K(  	  \        R\        \        V P                  4      4      4       R# )z1Print out a text representation of a code object.z: co_zconsts:N)
nameargcountposonlyargcountkwonlyargcountnamesvarnamescellvarsfreevarsnlocalsflags)printgetattrtupler   	co_consts)coattrs   & r   dumpr*      sB    = 	$EDL 9:;= 
)U6",,/01    c                 :    R \        4       P                  V4       2# )zForeign getitem: )super__getitem__)selfis   &&r   external_getitemr1      s    uw2215677r+   c                     a  ] tR t^t o ]R 4       t]R 4       tR tR tR t	R t
R tR tR	 t]P                  ! ]R
J R4      R 4       tR t]! 4       R 4       tR tR t]! 4       R 4       tR tR tR tR t]R 4       t]P                  ! ]R
J R4      R 4       t]P                  ! ]R
J R4      R 4       t]P                  ! ]R
J R4      R 4       tRt V t!R
# )CodeTestc                   \         P                  ! R 4      pVP                  RR^4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  ^4       V P                  \        4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)	_testcapifilenamefuncnameN)
r	   import_modulecode_newemptyassertEqualco_filenamer   co_firstlinenoassertRaises	Exceptionexec)r/   r5   r(   s   &  r   test_newemptyCodeTest.test_newempty   s    !//<	$$ZR@4Z0**B/y))H *)))s   B11C	c                (  aaa ^ RI Ho R oR oVVV3R lp ! R R\        4      pV! VR\        4       VP                  pVP
                  ^ ,          P                  pV P                  WB4       V! . R
O4      pV P                  V^ ,          R4       R	# )    )FunctionTypec                 $   a  V 3R  lP                   # )c                     < S # N 	__class__s   r   <lambda>ICodeTest.test_closure_injection.<locals>.create_closure.<locals>.<lambda>  s    Ir+   )__closure__rI   s   fr   create_closure7CodeTest.test_closure_injection.<locals>.create_closure  s    %222r+   c                    V P                  V P                  R,           \        \        ^.4      V P                  ,           R7      # )z9A new code object with a __class__ cell added to freevars)co_freevarsco_coderI   )replacerQ   bytesr   rR   )cs   &r   new_code1CodeTest.test_closure_injection.<locals>.new_code  s7    99)GQVXfhiWjQklmluluQu9vvr+   c                    < S! VP                   4      pS! V 4      pVP                  p\        WS! V\        4       WV4      4       R # rG   )__code____defaults__setattrglobals)	clsr   fcodeclosuredefaultsrD   rN   rV   s	   &&&   r   add_foreign_method;CodeTest.test_closure_injection.<locals>.add_foreign_method  s;    AJJ'D$S)G~~HC|D')TWUVr+   c                       ] tR tRtRtR# )-CodeTest.test_closure_injection.<locals>.Listi  rH   N__name__
__module____qualname____firstlineno____static_attributes__rH   r+   r   Listre         r+   rl   r.   zForeign getitem: 1N)         )	typesrD   listr1   r.   rM   cell_contentsassertIsr:   )	r/   rb   rl   function	class_refobjrD   rN   rV   s	   &     @@@r   test_closure_injectionCodeTest.test_closure_injection  s     	'	3	w	W	4 	 	40@A ##((+99	i& 9oQ!56r+   c                   R  pVP                   p\        V4      pV! VP                  VP                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                   VP"                  VP$                  VP&                  4       R# )c                      R # rG   rH   rH   r+   r   func'CodeTest.test_constructor.<locals>.func*  s    Dr+   N)rY   typeco_argcountco_posonlyargcountco_kwonlyargcount
co_nlocalsco_stacksizeco_flagsrR   r'   co_namesco_varnamesr;   r   co_qualnamer<   co_linetableco_exceptiontablerQ   co_cellvars)r/   r|   r(   CodeTypes   &   r   test_constructorCodeTest.test_constructor)  s    ]]8 	--,,



)),,#	(r+   c                    V P                  \        P                  P                  P                  \        P                  P
                  4       R # rG   )r:   r3   test_qualnamerY   r   ri   r/   s   &r   r   CodeTest.test_qualnameB  s4    ""++77""//	
r+   c                
   R  pVP                   pR pVP                   pR	R
RRRRVP                  \        P                  ,          3RRVP                  3RVP
                  3RRRRRRRVP                  33 F  w  rVV P                  WVR7      ;_uu_ 4        VP                  ! R/ WV/B pV P                  \        Wu4      V4       \        P                  ! V3/ WV/B pV P                  \        Wu4      V4       RRR4       K  	  VP                  VP                  VP                  R7      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       \        P                  ! W$P                  VP                  R7      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       R#   + '       g   i     EK  ; i)c                  
    ^p V # rn   rH   xs    r   r|   #CodeTest.test_replace.<locals>.funcI      AHr+   c                  
    ^p V # )ro   rH   )ys    r   func2$CodeTest.test_replace.<locals>.func2Q  r   r+   r   rR   r'   r   )r)   valueN)r   r   )r   rC   )r   rC   )r   rC   )r   rn   )r   rn   )r<   d   )r   )myname)r   )spam)rQ   )freevar)r   )cellvar)r;   newfilename)r   newnamerH   )rY   r   inspectCO_COROUTINErR   r'   r   subTestrS   r:   r%   copyr   r   )r/   r|   r_   r   code2r)   r   rV   s   &       r   test_replaceCodeTest.test_replaceH  s   	 }}
	  %$)=)==>#&%//*%&))*"U//0!
KD$ 455<<84-8  !8%@<<>>  !8%@	 65%
0 <<E,=,=+0+;+;   =--u/@/@A,,e.>.>?<<2C2C+0+;+;=--u/@/@A,,e.>.>? 655s   A"G00Hc                   R  pVP                   p\        V4      pR F  pV P                  \        4      ;_uu_ 4        V! VP                  VP
                  VP                  VP                  V,           VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  VP                   VP"                  VP$                  VP&                  VP(                  VP*                  4       RRR4       K  	  V P                  \        4      ;_uu_ 4        VP-                  VP                  ^,
          R7       RRR4       V P                  \        4      ;_uu_ 4        VP-                  VP                  ^,           R7       RRR4       R#   + '       g   i     EK  ; i  + '       g   i     Lp; i  + '       g   i     R# ; i)c                  
    ^p V # r   rH   r   s    r   r|   ,CodeTest.test_nlocals_mismatch.<locals>.funcx  r   r+   N)r   )rn   )rY   r~   r=   
ValueErrorr   r   r   r   r   r   rR   r'   r   r   r;   r   r   r<   r   r   rQ   r   rS   )r/   r|   r(   r   diffs   &    r   test_nlocals_mismatchCodeTest.test_nlocals_mismatchw  sP   	 ]] 8D"":....---**--% /. . z**JJ"--!"3J4 +z**JJ"--!"3J4 +*1 /.., +****s$   CF2;$G$G2GG	G+	c                j    R  pVP                   pVP                  RR7      pV P                  W#4       R# )c                    a  V 3R  l# )c                     < S # rG   rH   args   r   rK   BCodeTest.test_shrinking_localsplus.<locals>.func.<locals>.<lambda>  s    3r+   rH   r   s   fr   r|   0CodeTest.test_shrinking_localsplus.<locals>.func  s	    r+   r|   )r   N)rY   rS   r:   )r/   r|   r_   newcodes   &   r   test_shrinking_localsplus"CodeTest.test_shrinking_localsplus  s.    	}},,v,.'r+   c                    R  pVP                   P                  RR7      ;r#V P                  \        VP	                  4       4      . 4       R# )c                      R # rG   rH   rH   r+   r   r|   +CodeTest.test_empty_linetable.<locals>.func      r+   r+   r   N)rY   rS   r:   rr   co_lines)r/   r|   rV   r_   s   &   r   test_empty_linetableCodeTest.test_empty_linetable  s?    	--//S/AAh//12B7r+   c                    R  pV P                  \        4      ;_uu_ 4        VP                  P                   RRR4       R#   + '       g   i     R# ; i)c                      R # rG   rH   rH   r+   r   r|   3CodeTest.test_co_lnotab_is_deprecated.<locals>.func  r   r+   N)assertWarnsDeprecationWarningrY   	co_lnotab)r/   r|   s   & r   test_co_lnotab_is_deprecated%CodeTest.test_co_lnotab_is_deprecated  s7    	 011MM## 2111s   AA	Nz_testinternalcapi is missingc                B  a R oR pR pR pV3R lpV3R lpR pVVVVVV3 FV  pV P                  V4      ;_uu_ 4        \        P                  ! VP                  4      pV P	                  V4       RRR4       KX  	  R p	V3R	 lp
V3R
 lpV3R lpR pV	V
VVV3 FV  pV P                  V4      ;_uu_ 4        \        P                  ! VP                  4      pV P                  V4       RRR4       KX  	  R#   + '       g   i     K  ; i  + '       g   i     K  ; i)Tc                      R # rG   rH   rH   r+   r   spam1.CodeTest.test_returns_only_none.<locals>.spam1  r   r+   c                      R # rG   rH   rH   r+   r   spam2.CodeTest.test_returns_only_none.<locals>.spam2  s    r+   c                      R # rG   rH   rH   r+   r   spam3.CodeTest.test_returns_only_none.<locals>.spam3      r+   c                     < S '       g   R # R # rG   rH   r   s   r   spam4.CodeTest.test_returns_only_none.<locals>.spam4  s    r+   c                     < S '       g   R # R # rG   rH   r   s   r   spam5.CodeTest.test_returns_only_none.<locals>.spam5  s    r+   c                      R # rG   rH   rH   r+   r   rK   1CodeTest.test_returns_only_none.<locals>.<lambda>      4r+   Nc                      R # TrH   rH   r+   r   spam6.CodeTest.test_returns_only_none.<locals>.spam6  r   r+   c                     < S # rG   rH   r   s   r   spam7.CodeTest.test_returns_only_none.<locals>.spam7  s    Lr+   c                     < S '       d   R # R# )NTrH   r   s   r   spam8.CodeTest.test_returns_only_none.<locals>.spam8      r+   c                     < S '       d   R # R# TNrH   r   s   r   spam9.CodeTest.test_returns_only_none.<locals>.spam9  r   r+   c                      R # r   rH   rH   r+   r   rK   r     r   r+   )r   _testinternalcapicode_returns_only_nonerY   
assertTrueassertFalse)r/   r   r   r   r   r   lambda1r|   resr   r   r   r   lambda2r   s   &             @r   test_returns_only_noneCodeTest.test_returns_only_none  s   					  
D d##'>>t}}M$ $#
				  
D d##'>>t}}M  % $#
# $##0 $##s    2C992D9D
Dc                T   R  pV P                  \        ^,          R4       VP                  P                  RVP                  P                  R,          ,           R7      Vn        RpV P                  \        V4      ;_uu_ 4        V! 4        RRR4       R#   + '       g   i     R# ; i)c                      R # rG   rH   rH   r+   r   foo+CodeTest.test_invalid_bytecode.<locals>.foo  r   r+   z<127>   :rn   NNrR   zunknown opcode 127N)r:   r   rY   rS   rR   assertRaisesRegexSystemError)r/   r   msgs   &  r   test_invalid_bytecodeCodeTest.test_invalid_bytecode  s    	 	g. ||++cll22266 , 8 ###K55E 6555s   BB'	c                   ^ RI p/ p\        \        P                  ! R4      V4       VR,          pVP                  pVP
                  P                  p. p\        VP                  ! V4      VP                  4       4       FL  w  rxV P                  VP                  R4      . RO4       \        V4      '       d   K;  VP                  V4       KN  	  T P                  V U	u. uF  p	V	P                  V	P                   3NK  	  up	. RO4       R# u up	i )rC   NzX        try:
            1/0
        except Exception as e:
            exc = e
        exc)rC   rp      ))PUSH_EXC_INFON)
LOAD_CONSTN)
STORE_NAMEe)DELETE_NAMEr  RERAISErn   )COPYrp   )
POP_EXCEPTNr  )disr?   textwrapdedent__traceback__tb_framef_coder
   get_instructionsco_positionsassertIncountanyappendr:   r   argval)
r/   r  	namespacer  	tracebackr_   artificial_instructionsinstr	positionsinstructions
   &         r   )test_co_positions_artificial_instructions2CodeTest.test_co_positions_artificial_instructions  s    	X__  
 	 %%	!!(("$ ;  &(9(9(;!
E MM)//$/;y>>'..u5!
 	 $;#:K ##[%7%78#:		
s   !D
c                N    \         P                  ! R 4      p\        RRRV4       R# )#  
            def f():
                pass

            positions = f.__code__.co_positions()
            for line, end_line, column, end_column in positions:
                assert line == end_line
                assert column is None
                assert end_column is None
            z-Xno_debug_ranges-cNr  r  r   r/   r_   s   & r   6test_endline_and_columntable_none_when_no_debug_ranges?CodeTest.test_endline_and_columntable_none_when_no_debug_ranges(  s(      	  	 	0$=r+   c                N    \         P                  ! R 4      p\        RVRR7       R# )r)  r+  1)PYTHONNODEBUGRANGESNr,  r-  s   & r   :test_endline_and_columntable_none_when_no_debug_ranges_envCCodeTest.test_endline_and_columntable_none_when_no_debug_ranges_env7  s#     	  	 	t=r+   c                    R  pVP                   P                  RR7      pVP                  4       pV F9  w  rErgV P                  V4       V P	                  WRP
                  ^,           4       K;  	  R# )c                  
    ^p R# )rn   NrH   r   s    r   r|   8CodeTest.test_co_positions_empty_linetable.<locals>.funcI  s    Ar+   r+   r   N)rY   rS   r  assertIsNoner:   r<   )r/   r|   rV   r$  lineend_linecolumn
end_columns   &       r   !test_co_positions_empty_linetable*CodeTest.test_co_positions_empty_linetableG  sb    	==((c(:))+	2;.DFd#X'>'>'BC 3<r+   c                \   R  pVP                   pVP                  RR7      pVP                  RR7      pVP                  RR7      pV P                  W#4       V P                  W$4       V P                  W%4       V P                  W44       V P                  W54       V P                  WE4       R# )c                       \        4        \        4        \        4        R #    \        4         L; i  \        4        i ; irG   )arU   bdrH   r+   r   r^   &CodeTest.test_code_equality.<locals>.fR  s,      s   
" 
3 03 ?r+   r   )r   N)rY   rS   assertNotEqual)r/   r^   code_acode_bcode_ccode_ds   &     r   test_code_equalityCodeTest.test_code_equalityQ  s    	 S1#6#6F+F+F+F+F+F+r+   c                2   R  P                   pR P                   pV P                  W4       V P                  \        V4      \        V4      4       VP                  ^R7      pV P                  W4       V P                  \        V4      \        V4      4       R# )c                      ^# r   rH   rH   r+   r   rK   :CodeTest.test_code_hash_uses_firstlineno.<locals>.<lambda>g      ar+   c                      ^# r   rH   rH   r+   r   rK   rN  h  rO  r+   )r<   N)rY   rE  hashrS   )r/   c1c2c3s   &   r   test_code_hash_uses_firstlineno(CodeTest.test_code_hash_uses_firstlinenof  st    !!!!B#DHd2h/ZZrZ*B#DHd2h/r+   c                d   R ^R^/R lP                   pV P                  VP                  ^4       V P                  VP                  ^ 4       V P                  VP                  ^4       VP                  ^^ R7      pV P                  W4       V P                  \        V4      \        V4      4       R# )zwc                    ^# r   rH   )r   r   rX  rY  s   &&$$r   rK   4CodeTest.test_code_hash_uses_order.<locals>.<lambda>q  s    qr+   )r   r   N)rY   r:   r   r   r   rS   rE  rQ  )r/   rU   swappeds   &  r   test_code_hash_uses_order"CodeTest.test_code_hash_uses_ordero  s    (q(A(22*--q1,,a0))qA)FA'DGT']3r+   c                    R  P                   pR P                   pVP                  VP                  R7      pV P                  W4       V P                  \	        V4      \	        V4      4       R# )c                     W,           # rG   rH   r   r   s   &&r   rK   7CodeTest.test_code_hash_uses_bytecode.<locals>.<lambda>z      !%r+   c                     W,          # rG   rH   ra  s   &&r   rK   rb  {  rc  r+   r  N)rY   rS   rR   rE  rQ  )r/   rU   rC  rR  s   &   r   test_code_hash_uses_bytecode%CodeTest.test_code_hash_uses_bytecodey  sR    ))))YYqyyY)A"DGT"X.r+   c                "   \        RRR4      p\        RRR4      pR\        P                  ! 4       n        \        P                  ! R 4       \        VR. /4       \        VR. /4       V P                  W4       \        P                  ! R4       R# )	zGH-109052

Make sure the instrumentation doesn't affect the code equality
The validity of this test relies on the fact that "x is x" and
"x in x" have only one different instruction and the instructions
have the same argument.

zx is xz
example.pyevalzx in xTc                      R # rG   rH   )argss   *r   rK   ?CodeTest.test_code_equal_with_instrumentation.<locals>.<lambda>  s    4r+   r   N)compilesys	_getframef_trace_opcodessettracer?   rE  )r/   code1r   s   &  r   $test_code_equal_with_instrumentation-CodeTest.test_code_equal_with_instrumentation  sq     ,7,7*.''(US"IUS"IE)Tr+   zmissing _testinternalcapic                J   ^p^p^p^p^ p^@p^pWQ,          pWQ,          V,          p	WR,          p
WS,          V,          pWS,          V,          p/ \         P                  / b\         P                  RVRVRVRVRV/b\         P                  RVRV/b\         P                  / b\         P
                  / b\         P                  / b\         P                  RVR	VR
VRV/b\         P                  RVRVRVR
VRV/b\         P                  / b\         P                  RVRVRV	RV	RV
RV
RVRV/b\         P                  RVRVRV	RV	RV
RV
RVRV/b\         P                  RVRVRV	RV	RV
RV
RVRV/b\         P                  RV	/b\         P                  / b\         P                  RV/b\         P                   RVRV/b\         P"                  RV	RV	RV	/b/ \         P$                  RVRVRV	RV	RV
RV
RVRVRVRVRVRV/b\         P&                  RV	/b\         P(                  RV	RV/b\         P*                  RW,          RVRV/b\         P,                  RV	RV/b\         P.                  RW,          RVRV/b\         P0                  RW,          RVRV/b\         P2                  RW,          RVRV/b\         P4                  RV	/b\         P6                  RV	RVRV/b\         P8                  RV	R V/b\         P:                  RW,          RVRVR!V/b\         P<                  RV	RVRVR"V/b\         P>                  RW,          RVRVRVR#V/b\         P@                  RV	/b\         PB                  RV	RVRVRV/b\         PD                  RV	/bC\         PF                  RV	RVRVRVRV//Cp\         PH                   F_  pV PK                  V4      ;_uu_ 4        W,          p\L        PN                  ! VPP                  4      pV PS                  VV4       R$R$R$4       Ka  	  R$#   + '       g   i     Kv  ; i)%ro   rw   picklespam_minimaldatar   obj1obj2r   valueschecksfunc1r   funcsrA  rB  rU   rC  r  r^   rj  kwargseggsr   rX  extraseggs_nestedeggs_closureeggs_nested_Neggs_nested_Ceggs_closure_Neggs_closure_C
ham_nestedham_closureham_C_nestedham_C_closureN)*defssimple_scriptcomplex_scriptscript_with_globals!script_with_explicit_empty_returnscript_with_returnrv  spam_with_builtinsspam_with_globals_and_builtins#spam_with_global_and_attr_same_namespam_full_argsspam_full_args_with_defaultsspam_args_attrs_and_builtinsspam_returns_argspam_raisesspam_with_inner_not_closurespam_with_inner_closurespam_annotated	spam_fullr   spam_Nspam_Cspam_NNspam_NCspam_CNspam_CCr  r  r  r  r  r  r  r  r  r  	FUNCTIONSr   r   get_co_localskindsrY   r:   )r/   CO_FAST_ARG_POSCO_FAST_ARG_KWCO_FAST_ARG_VARCO_FAST_HIDDENCO_FAST_LOCALCO_FAST_CELLCO_FAST_FREEPOSONLYPOSORKWKWONLYVARARGS	VARKWARGSr}  r|   expectedkindss   &                r   test_local_kindsCodeTest.test_local_kinds  s   11NB/1OC!3nD	k
k
}-}"k
 $$'k
 22Bk
 ##Rk
 rk
  ##]--}	&!k
, //-}2-k
: 44b;k
< WWWWVV)	"=k
P --WWWWVV)	0Qk
d --WWWWVV)	0ek
x !!W$yk
~ bk
@ ,,/Ak
F ((\+Gk
N WWW"Ok
X NNWWWWVV)]]]-Yk
t IIWuk
z KKW}{k
B KKW+\Ck
L LLWMk
T LLW+\Uk
^ LLW+\ -_k
h LLW+\ -ik
r Wsk
x W\\ yk
B Wm!Ck
J W+\\}	!Kk
V W\\	"Wk
b W+\\\"ck
p OOWqk
v W\\\	wk
B W Ck
H W\\\\!Ik
Z NNDd## ;)<<T]]K  1 $# ####s   ;PP"c                   R V n         R^ R^ R^ R^ R^ R^ R^ R^ R	^ R
^ R^ R^ /R lp/ \        P                  V! 4       b\        P                  V! ^^^R7      b\        P                  V! ^^R7      b\        P
                  V! 4       b\        P                  V! 4       b\        P                  V! 4       b\        P                  V! 4       b\        P                  V! ^^R7      b\        P                  V! ^^R7      b\        P                  V! ^^R7      b\        P                  V! ^^^^^R7      b\        P                  V! ^^^^^R7      b\        P                  V! ^^^^^^R7      b\        P                  V! ^R7      b\        P                  V! ^R7      b\        P                   V! ^R7      b\        P"                  V! ^^R7      b/ \        P$                  V! ^R7      b\        P&                  V! ^^^^^^^^R7      b\        P(                  V! ^R7      b\        P*                  V! ^^R7      b\        P,                  V! ^^^^R7      b\        P.                  V! ^^R7      b\        P0                  V! ^^^^R7      b\        P2                  V! ^^^^R7      b\        P4                  V! ^^^^R7      b\        P6                  V! ^R7      b\        P8                  V! ^^R7      b\        P:                  V! ^^R7      b\        P<                  V! ^^^^R7      b\        P>                  V! ^^^R7      b\        P@                  V! ^^^^^R7      b\        PB                  V! ^R7      b\        PD                  V! ^^R7      bC\        PF                  V! ^R7      \        PH                  V! ^^R7      /Cp\        PJ                   F^  pV PM                  V4      ;_uu_ 4        W#,          p\N        PP                  ! VPR                  4      pV PU                  WT4       R R R 4       K`  	  \        P                  pV PM                  V R24      ;_uu_ 4        V! ^^R7      p\N        PP                  ! VPR                  4      pV PU                  WT4       R R R 4       V PM                  V R24      ;_uu_ 4        V! ^R&R7      p\N        PP                  ! V4      pV PU                  WT4       R R R 4       V PM                  V R 24      ;_uu_ 4        V! ^R'R7      p\N        PP                  ! V/ R!7      pV PU                  WT4       R R R 4       V PM                  V R"24      ;_uu_ 4        V! ^^R7      p\N        PP                  ! V/ / R#7      pV PU                  WT4       R R R 4       V PM                  V R$24      ;_uu_ 4        V! ^R(R7      p\N        PP                  ! V/ R%7      pV PU                  WT4       R R R 4       R #   + '       g   i     EKE  ; i  + '       g   i     EL; i  + '       g   i     ELE; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     R # ; i))Nposonlyposorkwkwonlyvarargs	varkwargs
purelocalsargcells
othercellsr!   
globalvarsattrsunknownc                 N   W,           V,           V,           V,           pW,           V,           p\        V	\        4      '       d   R V	R^ R^ RV	/p	Md^ p\        V	\        4      '       d/   V	R,          pV	R,          p^pRV	9   d   V	R,          pV^,          pM V	w  ppR VV,           V,           RVRVRV/p	V	R ,          V
,           V,           pR W,           V,           RR VRR VRV RVRVR	VR
V/RVRR Wg,           RVRV/RR ^ R^ R^ //RVRR VRV	RV
RV//#   \         d
    T	w  ppp Li ; i)total	numglobal
numbuiltin
numunknownlocalsrj  
numposonly
numposorkw	numkwonlyr  r  numpurecellsnumargs	numothershiddennumcellsnumfreeunboundr\   numattrs)
isinstanceintdictr   )r  r  r  r  r  r  r  r  r!   r  r  r  nargvarsr"   g_numunknownr  r  sizer  s   $$$$$$$$$$$$       r   new_var_counts0CodeTest.test_var_counts.<locals>.new_var_countsY  s    (61G;iGH+j8G*c**Z ! *	
  !j$// *; 7I!+L!9JD#z1'1,'?	I0:-	: Y3lB * ,	
 !)E1G;G+g5W$g$g#V!7#Y z!6!8#Z
 !1"A!, 8Wz '	3  & I>H;	:|Is   D D$#D$)r  r  r  )r  r  )r  r  )r  r  r  r  r  )r  r  r  r  r  r  )r  )r  )r  )r  r  )r  r  r  r  r  r  r  r  )r  r  )r  r  r  r  )r  r!   )r  r  r  r!   )r  r  r!   )r  r  r  r  r!   z codez with own globals and builtinsz without globals)	globalsnsz without both)r  
builtinsnsz without builtins)r  )ro   r	  )rC   r	  ro   )ro   rC   r	  )+maxDiffr  r  r  r  r  r  rv  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   get_code_var_countsrY   r:   )r/   r  r}  r|   r  countss   &     r   test_var_countsCodeTest.test_var_countsV  s:   M	#$M	#$M	 #$M	 $%	M	
 &'M	 '(M	 %&M	 '(M	 %&M	 '(M	 "#M	 $%M	^Y
 0Y
"Y
 $$n'Y
 22N4DY
 ##^%5Y
 ~/Y
 ~/Y
 ##^&Y
& //2'Y
. 44n7/Y
6 "7Y
D --~0EY
R --~0SY
b !!>$cY
h niY
n ,,n/oY
t ((.+uY
| "}Y
B NNN	CY
V II~WY
\ KK]Y
d KK	eY
p LL.qY
x LL.	yY
D LL.	EY
P LL.	QY
\ n]Y
b ~ cY
j !kY
r 	!sY
~ "Y
H "IY
V OO^WY
\ n]Y
d ~  !kY
v NNDd## ;*>>t}}M  2 $# # 22\\TF%.))%H '::4==IFV. * \\TF"@ABB%!H '::4@FV. C \\TF"2344%$H '::42NFV. 5 \\TF-011%H '::42!FV. 2 \\TF"3455%$H '::4BOFV. 65O $## *)) CBB 544 21 655sH   !:W8<X32X!	4X5!5Y	:4Y8X
X	!X2	5Y		Y	Y-	c           
        R V n         . \        P                  O\        P                  Np\        P                   FG  pV P                  VR34      ;_uu_ 4        \        P                  ! VP                  4       R R R 4       KI  	  V F=  pV P                  VR34      ;_uu_ 4        \        P                  ! V4       R R R 4       K?  	  \        P                   F  pV\        P                  9  dk   V P                  VR34      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        P                  ! VP                  4       R R R 4       R R R 4       W!9  g   K  V P                  VR34      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        P                  ! V4       R R R 4       R R R 4       K  	  R #   + '       g   i     EK  ; i  + '       g   i     EKh  ; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Ln; i  + '       g   i     EKe  ; i)Nz(code)z(func))r  r  STATELESS_FUNCTIONSr  STATELESS_CODEr   r   verify_stateless_coderY   r  r=   r>   )r/   r  r|   s   &  r   test_statelessCodeTest.test_statelesss  s   
%%
 --
 ''DtX.//!77F 0/ ( (DtX.//!77= 0/ ( NND4...\\4"233**955)??N 6 4 .\\4"233**955)??E 6 43 # 0// 0// 65 43 65 433s`   !G%GH)!G2
H=H+H2H+GG/2H=HHH(#H++H=)r  )"rg   rh   ri   rj   r   r@   rx   r   r   r   r   r   r   r   unittestskipIfr   r   r  r   r&  r.  r3  r=  rJ  rU  r]  re  rr  r  r  r  rk   __classdictcell____classdict__s   @r   r3   r3      s_      7 7@(2
-@^#5J(8$ __&$.0NO4& P4&l -
 -
^>>  D D,*04/  $ __&$.0KL@2 M@2D __&$.0KLZ/ MZ/x __&$.0KLF MFr+   r3   c                 T    V \         P                  ! R V ,           R ,           ^R 4      J # )_r   )rm  intern)ss   &r   
isinternedr    s%    

C!GcM1R0111r+   c                      a  ] tR tRt o R tR tR t]R 4       t]R 4       t	]R 4       t
]R 4       t]]P                  ! ]R	4      R
 4       4       t]]P                   ! ]R4      R 4       4       t]R 4       tRtV tR# )CodeConstsTesti  c                p    V F  pW28X  g   K  Vu # 	  V P                  W!4       V P                  R 4       R# )zShould never be reachedN)r  fail)r/   r   r   vs   &&& r   
find_constCodeConstsTest.find_const  s1    Az  	e$		+,r+   c                X    \        V4      '       g   V P                  R V: R24       R# R# )String z is not internedNr  r  r/   r  s   &&r   assertIsInternedCodeConstsTest.assertIsInterned  s    !}}IIQ89 r+   c                X    \        V4      '       d   V P                  R V: R24       R# R# )r  z is internedNr  r  s   &&r   assertIsNotInterned"CodeConstsTest.assertIsNotInterned  s    a==II45 r+   c                z    \        R RR4      pV P                  VP                  R4      pV P                  V4       R# )zres = "str_value"?r?   	str_valueNrl  r  r'   r  r/   r(   r  s   &  r   test_interned_string#CodeConstsTest.test_interned_string  s3    (#v6OOBLL+6a r+   c                    \        R RR4      pV P                  VP                  R4      pV P                  V^ ,          4       R# )zres = ("str_value",)r  r?   Nr  r  r  s   &  r   test_interned_string_in_tuple,CodeConstsTest.test_interned_string_in_tuple  s7    +S&9OOBLL.9ad#r+   c                    \        R RR4      pV P                  VP                  \        R4      4      pV P	                  \        V4      ^ ,          4       R# )zres = a in {"str_value"}r  r?   Nr
  )rl  r  r'   	frozensetr  r&   r  s   &  r   !test_interned_string_in_frozenset0CodeConstsTest.test_interned_string_in_frozenset  s@    /f=OOBLL)N*CDeAhqk*r+   c                <    RR lpV P                  V! 4       4       R# )r  c                     V # rG   rH   )rA  s   &r   r^   6CodeConstsTest.test_interned_string_default.<locals>.f  s    Hr+   Nr
  )r  r/   r^   s   & r   test_interned_string_default+CodeConstsTest.test_interned_string_default  s    	ac"r+   z0free-threaded build interns all string constantsc                z    \        R RR4      pV P                  VP                  R4      pV P                  V4       R# )zres = "str\0value!"r  r?   z
str value!N)rl  r  r'   r   r  s   &  r   test_interned_string_with_null-CodeConstsTest.test_interned_string_with_null  s5     +S&9OOBLL-8  #r+   zdoes not intern all constantsc                    / p\        \        P                  ! R 4      V4       \        \        P                  ! R4      V4       V P                  VR,          ! 4       VR,          ! 4       J 4       R# )zP
            def func1():
                return (0.0, (1, 2, "hello"))
        zP
            def func2():
                return (0.0, (1, 2, "hello"))
        r|  r   N)r?   r  r  r   )r/   r\   s   & r   test_interned_constants&CodeConstsTest.test_interned_constants  sh    
 X__   	
 	X__   	
 	(*gg.>.@@Ar+   c                N    ! R  R4      p ! R R\         4      p\        RRR4      pVP                  ^V! 4       V! ^4      V! ^4      3R7      pV P                  VP                  ^,          V4       V P                  VP                  ^,          VP                  ^,          4       R# )	c                   &   a  ] tR tRt o R tRtV tR# )9CodeConstsTest.test_unusual_constants.<locals>.Unhashablei  c                    \        R 4      h)zunhashable type)	TypeErrorr   s   &r   __hash__BCodeConstsTest.test_unusual_constants.<locals>.Unhashable.__hash__  s     122r+   rH   N)rg   rh   ri   rj   r"  rk   r  r  s   @r   
Unhashabler    s     3 3r+   r$  c                       ] tR tRtRtR# )4CodeConstsTest.test_unusual_constants.<locals>.MyInti  rH   Nrf   rH   r+   r   MyIntr&    rm   r+   r'  za = 1z<string>r?   )r'   N)r  rl  rS   assertIsInstancer'   r:   )r/   r$  r'  r_   s   &   r   test_unusual_constants%CodeConstsTest.test_unusual_constants  s    
	3 	3	C 	 w
F3||q*,a%(&K|LdnnQ/<*DNN1,=>r+   rH   N)rg   rh   ri   rj   r  r  r   r   r  r  r  r  r  r  r   r  
skipUnlessr  r)  rk   r  r  s   @r   r  r    s     -:6 ! !
 $ $
 + +
 # #
 ___&XY$ Z $
 *IJB K B  ? ?r+   r  c                   &   a  ] tR tRt o R tRtV tR# )CodeWeakRefTesti  c                n  a  / p\        R \        4       V4       VR,          p?RS n        V 3R lp\        P                  ! VP
                  V4      pS P                  \        V! 4       4      4       ?\        4        S P                  \        V! 4       4      4       S P                  S P                  4       R# )zdef f(): passr^   Fc                    < R Sn         R# r   called)r_   r/   s   &r   callback,CodeWeakRefTest.test_basic.<locals>.callback  s
    DKr+   N)
r?   r\   r1  weakrefrefrY   r   boolr   r   )r/   r   r^   r2  coderefs   f    r   
test_basicCodeWeakRefTest.test_basic  s     	_gi3cN	 ++ajj(3WY(gi)$r+   r0  N)rg   rh   ri   rj   r8  rk   r  r  s   @r   r-  r-    s     % %r+   r-  c                     \        V 4      # rG   )next)its   &r   readr=    s    8Or+   c                     \        V 4      pV^?,          p^ pV^@,          '       d-   \        V 4      pV^,          pW!^?,          V,          ,          pK;  V# )?   )r=  )r<  rB  valshifts   &   r   read_varintrB    sI    RA
b&CE
b&&H
"Jr+   c                 \    \        V 4      pV^,          '       d   V^,	          ) # V^,	          # r   )rB  )r<  uvals   & r   read_signed_varintrE    s*    r?Daxx|qyr+   c              #     "   V P                   p\        V P                  4      p  \        V4      pT^,	          ^,          p T^,          ^,           pT ^8X  d   YRRRR3x  K?  T ^8X  dk   \        T4      pY,          pT\        T4      ,           p\        T4      pT^ 8X  d   RpM	T^,          p\        T4      pT^ 8X  d   RpM	T^,          pYYYx3x  K  T ^8X  d   \        T4      pY,          pYYRR3x  K  T R9   d2   T ^
,
          pY,          p\        T4      p	\        T4      p
YYY3x  EK  \        T4      pT ^,          T^,	          ,          p	YYYT^,          ,           3x  EKF    \         d     R# i ; i5i)TN)
         )r<   iterr   r=  StopIterationrE  rB  )r_   r9  r<  
first_bytelength
line_deltar:  colend_colr;  r<  second_bytes   &           r   parse_location_tablerR    s    D	d	 B
	bJ a2%q.A%2:tT488RZ+B/JDk"o-Hb/Caxq!"oG!|1>>RZ+B/JDT488\!JD"XFbJV@@ r(KQY+"23FV{R?O5PQQG  		s(   #E<E* D9E<*E95E<8E99E<c              #   j   "   \        V 4       F  w  rr4rV\        V4       F	  pW4WV3x  K  	  K!  	  R # 5irG   )rR  range)r_   r  rM  r9  r:  rO  rP  s   &      r   positions_from_location_tablerU  @  s5     3G3M/43vA300  4Ns   13c              #   <   "   V  F  pW!8w  g   K  Vx  TpK  	  R # 5irG   rH   )lstprevitems   && r   deduprZ  E  s     <JD s   	c                 &    \        R  V  4       4      # )c              3   .   "   T F  w  p  q!x  K  	  R # 5irG   rH   ).0lr  s   &  r   	<genexpr>&lines_from_postions.<locals>.<genexpr>L  s     1y|1ays   )rZ  )r$  s   &r   lines_from_postionsra  K  s    1y111r+   c                 t    ^X ,           p\         \        ,           \        ,           p V'       d   \        # \        # )z






    )rA  rB  rC  qp)r   r   s     r   
misshappenre  N  sK     	
 	
		
  	
	
 	  	
   	r+   c                  6    R P                  4       p \        4       h)z
            )stripr   )!example_report_generation_messages    r   bug93662ri  n  s    eg & ,r+   c                   ^   a  ] tR tRt o R tR tR tR t]R 4       t	]R 4       t
R tR	tV tR
# )CodeLocationTestiv  c                   \        VP                  P                  4       4      p\        \        VP                  4      4      p\	        W#4       F  w  rEV P                  WE4       K  	  V P                  \        V4      \        V4      4       R # rG   )rr   rY   r  rU  zipr:   len)r/   r|   pos1pos2l1l2s   &&    r   check_positions CodeLocationTest.check_positionsx  sc    DMM..011$--@A$oFBR$ &TCI.r+   c                    V P                  \        4       V P                  \        4       V P                  \        4       R # rG   )rs  rR  re  ri  r   s   &r   test_positionsCodeLocationTest.test_positions  s-    12Z(X&r+   c                   VP                   pVP                  4        UUu. uF  w   r4VNK
  	  pppV P                  V\        \	        V4      4      4       \        \        \        V4      4      4      p\        WV4       F  w  rxV P                  Wx4       K  	  V P                  \        V4      \        V4      4       R # u uppi rG   )	rY   r   r:   rr   rZ  ra  rU  rm  rn  )	r/   r|   r(   r  r9  lines1lines2rq  rr  s	   &&       r   check_linesCodeLocationTest.check_lines  s    ]])+7:1a$7eFm!45)*G*KLM&)FBR$ *Vc&k2 8s   B=c                    V P                  \        4       V P                  \        4       V P                  \        4       R # rG   )r{  rR  re  ri  r   s   &r   
test_linesCodeLocationTest.test_lines  s-    -.$"r+   c                   R  p^pVP                   P                  ^^*\        \        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^.4      \        ^V^,          ,          ^,          ^ .4      R7      Vn         V P                  \        V4       V P                  \        VP                   P                  4       4      ^R.,          4       R# )c                      R # rG   rH   rH   r+   r   r^   /CodeLocationTest.test_code_new_empty.<locals>.f  r   r+   RESUMELOAD_COMMON_CONSTANTRAISE_VARARGS)r   r<   rR   r   N)*   r  NN)
rY   rS   rT   r  r   r=   AssertionErrorr:   rr   r  )r/   r^    PY_CODE_LOCATION_INFO_NO_COLUMNSs   &  r   test_code_new_empty$CodeLocationTest.test_code_new_empty  s    
	+-(ZZ''IIh'II45qIIo. 71<> 	 ( 

& 	.!,((*+%&&	
r+   c                R    \         P                  ! R 4      p\        RRV4      w  r#pR# )aF  
            def has_docstring(x, y):
                """This is a first-line doc string"""
                """This is a second-line doc string"""
                a = x + y
                b = x - y
                return a, b


            def no_docstring(x):
                def g(y):
                    return x + y
                return g


            async def async_func():
                """asynf function doc string"""
                pass


            for func in [has_docstring, no_docstring(4), async_func]:
                assert(func.__doc__ is None)
            z-OOr+  Nr,  )r/   r_   rcouterrs   &    r   test_docstring_under_o2(CodeLocationTest.test_docstring_under_o2  s)       0 (tT:r+   c                    R  pR pV P                  V! V4      R.4       R pV P                  V! V4      R.4       R pV P                  V! V4      R.4       R# )c                     V P                   pVP                  pVP                  4        UUUu. uF;  w  r4p\        W4      V,
          \        W4      V,
          \        W4      V,
          3NK=  	  uppp# u upppi rG   )rY   r<   co_branchesr   )r|   r_   basesrcleftrights   &     r   get_line_branches<CodeLocationTest.test_co_branches.<locals>.get_line_branches  sz    ==D&&D   " # )s% (2T9'3d:'4t;
 #  s   AA3c                 2    V '       d	   \          R # \         R # rG   )ABr   s   &r   simple1CodeLocationTest.test_co_branches.<locals>.simple  s    r+   c                    V '       Ed   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   \         P                   R # \         R # rG   )r  r   r  r   s   &r   with_extended_args=CodeLocationTest.test_co_branches.<locals>.with_extended_args  s    qQSS!##qssACCQSS!##qssACCQSS!##qssACCQSS!##qssACCQSS!##qssACCr+   c                  8   "   \           R j  xL
  p K   LDR # 5irG   )async_iter1)letters    r   afunc0CodeLocationTest.test_co_branches.<locals>.afunc  s!      +  fs   N)rn   ro   r	  )rn   ro      )rn   rn   rp   )r:   )r/   r  r  r  r  s   &    r   test_co_branches!CodeLocationTest.test_co_branches  sn    
		 	f%I		 	01I		
 	e$I	r+   rH   N)rg   rh   ri   rj   rs  rv  r{  r~  r   r  r  r  rk   r  r  s   @r   rk  rk  v  sL     /'
3#
 
 
@ ; ;6- -r+   rk  T)cpythonc                 
    V s R # rG   )
LAST_FREED)ptrs   &r   myfreer    s    
r+   c                   l   a  ] tR tRt o R tR tR tR tR t]	P                  ! 4       R 4       tRtV tR	# )
CoExtrai  c                    \        R 4      # )z	lambda:42)rh  r   s   &r   get_funcCoExtra.get_func  s     $$r+   c           	         V P                  4       pV P                  \        \        ^*\        \
        P                  ! ^d4      4       V P                  \        \        ^*\        \
        P                  ! ^d4      4       R# )r  N)r  r=   r  SetExtra
FREE_INDEXctypesc_voidpGetExtrar  s   & r   test_get_non_codeCoExtra.test_get_non_code  sQ    Ak8R$nnS13k8R$nnS13r+   c           	     >   V P                  4       pV P                  \        \        VP                  \
        ^d,           \        P                  ! ^d4      4       V P                  \        VP                  \
        ^d,           \        P                  ! ^d4      4      ^ 4       R# r   N)
r  r=   r  r  rY   r  r  r  r:   r  r  s   & r   test_bad_indexCoExtra.test_bad_index&  sh    Ak8QZZ(nfnnS.ACXajj*S.$nnS13457r+   c                    V P                  4       p\        VP                  \        \        P
                  ! ^d4      4       ?\        4        V P                  \        ^d4       R# r  )	r  r  rY   r  r  r  r   r:   r  r  s   & r   test_free_calledCoExtra.test_free_called-  s@     AQZZV^^C-@ALZ-r+   c                   V P                  4       p\        P                  ! 4       p\        VP                  \
        \        P                  ! ^4      4       \        VP                  \
        \        P                  ! R4      4       V P                  \        ^4       \        P                  ! 4       p\        VP                  \
        V4       V P                  VP                  R4       ?R# )   i,  N)
r  r  r  r  rY   r  r:   r  r  r   )r/   r^   extras   &  r   test_get_setCoExtra.test_get_set7  s    ANN$EQZZV^^C-@AQZZV^^C-@AZ-NN$EQZZU3U[[#.r+   c                H   V P                  4       p ! R  R\        P                  4      p\        VP                  \
        \        P                  ! R4      4       V! W4      p?VP                  4        VP                  4        \        4        V P                  \        R4       R# )c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# )6CoExtra.test_free_different_thread.<locals>.ThreadTestiL  c                <   < \         SV `  4        Wn        W n        R # rG   )r-   __init__r^   test)r/   r^   r  rJ   s   &&&r   r  ?CoExtra.test_free_different_thread.<locals>.ThreadTest.__init__M  s    G$&F $Ir+   c                z    V = \        4        \        '       g#   V P                  P	                  \
        R 4       R# R# )  N)r^   r   r   r  r:   r  r   s   &r   run:CoExtra.test_free_different_thread.<locals>.ThreadTest.runQ  s,    L +?		--j#> +r+   )r^   r  )	rg   rh   ri   rj   r  r  rk   r  __classcell__)rJ   r  s   @@r   
ThreadTestr  L  s     %? ?r+   r  r  N)r  	threadingThreadr  rY   r  r  r  startjoinr   r:   r  )r/   r^   r  tts   &   r   test_free_different_thread"CoExtra.test_free_different_threadG  sp     A?Y-- ? QZZV^^C-@AA$BHHJGGILZ-r+   rH   N)rg   rh   ri   rj   r  r  r  r  r  r   requires_working_threadingr  rk   r  r  s   @r   r  r    s;     	%	3	7	.	  
	4	4	6	. 
7	.r+   r  c                 N    VP                  \        P                  ! 4       4       V# rG   )addTestdoctestDocTestSuite)loadertestspatterns   &&&r   
load_testsr  c  s    	MM'&&()Lr+   __main__)O__doc__r   r   rm  r  r  r  r  r4  r  r  ImportErrortest.supportr   r   r   r   r   test.support.script_helperr   r   r	   test.support.bytecode_helperr
   opcoder   r   r5   r   r   ModuleNotFoundErrortest._code_definitions_code_definitionsr  r   r   r*   r1   TestCaser3   r  r  r-  r=  rB  rE  rR  rU  objectrZ  ra  re  ri  rk  	pythonapipy	CFUNCTYPEr  freefunc%PyUnstable_Eval_RequestCodeExtraIndexRequestCodeExtraIndexargtypes	c_ssize_trestypePyUnstable_Code_SetExtrar  	py_objectc_intPyUnstable_Code_GetExtrar  POINTERr  r  	FREE_FUNCr  r  r  rg   mainrH   r+   r   <module>r     sR  BH   
      
7 7 8 8 D   ) &'(28RFx   RFj2Q?X&& Q?h%h'' %4)RV1
 H 2@Fx(( FP T""v'9			BV^^4HDD&.["$*$4$4!**H))6+;+;V^^LH||H**H))6+;+;79H||HJ  I&y1JI.(## I.X
 zMMO o,  F  s#   H9 I	 9	II		II