
    h                     Z    S SK r S SKJr  S SKJrJrJrJr   " S S\ R                  5      r	g)    N)Shadow)OptionsCythonScope
PyrexTypesErrorsc                   ,    \ rS rSrS rS rS rS rSrg)
TestShadow   c                    / n/ n[         R                  R                  5        GH  nUR                  S5      nUS   USS  pe[         R                  R                  U5      nU(       a@  [        U5      S:X  a1  US   S:X  a(  [        [        U5      (       a  UR                  U5        M  US:X  a  M  US:X  a  M  [        [        U5      (       d  UR                  U5        M  U(       d  M  [        [        U5      nU H;  n	[        [        U5      S5      (       d  [        [        U5      S5      (       d  M9    GM     GM     U R                  U/ 5        U R                  U/ 5        g )	N.r      modulecollection_typestaticmethod__getattr____getattribute__)r   directive_typeskeyssplitdirective_scopesgetlenhasattrr   appendgetattrtypeassertEqual)
selfmissing_directivesextra_directivesfull_directivesplit_directive	directiverestscopedirective_valuesubdirectives
             Q/var/www/fran/franai/venv/lib/python3.13/site-packages/Cython/Tests/TestShadow.pytest_all_directives_in_shadow(TestShadow.test_all_directives_in_shadow   s3   %55::<N,2237O-a0/!"2Et,,00@EUqU1X-A69--$++N;!22 / 69--")).9")&)"<$(L_ 5}EE#D$9;MNN	 %)1 =: 	+R0)2.    c                 V   [         R                  " S 5      n/ nUR                  R                  5        Ha  nUR	                  S5      (       a  UR                  S5      (       a  M1  US;   a  M9  [        [        U5      (       a  MP  UR                  U5        Mc     U R                  U/ 5        g )N__)PyTypeObjectPyObject_TypeCheck)
r   create_cython_scopeentriesr   
startswithendswithr   r   r   r   )r   cython_scopemissing_typeskeys       r(   test_all_types_in_shadow#TestShadow.test_all_types_in_shadow*   s    "66t< '',,.C~~d##T(:(:<< 63''$$S) / 	+r+   c                    / n[         R                   H  nS H  nX2-   nU(       aO  US;   d  US:X  aC  U R                  U[        [         5      5        U R                  SU-   [        [         5      5        M]  [	        [         U5      (       d  UR                  U5        [        SS5       H6  nSU-  S-   U-   n[	        [         U5      (       a  M%  UR                  U5        M8     M     M     U R                  U/ 5        g )	N) us)
Py_UNICODEPy_UCS4
Py_ssize_tssize_t	ptrdiff_t	Py_hash_tusize_tp_r      p_)r   	int_typesassertNotIndirr   r   ranger   )r   r5   int_namesignnameptrptr_names          r(   test_int_types_in_shadow#TestShadow.test_int_types_in_shadow<   s    ((H&  %J J	) $$T3v;7$$TD[#f+>vt,,!((. A;C"Sy35H"6844%,,X6 '! ' )* 	+r+   c                    [         R                  " S 5      n " S S5      nX!l        [        R                  " 5         / n/ n[
        R                  R                  5        H  u  u  pVpxUS:X  a  M  [        [        U5      (       d  UR                  U5        UR                  U5      (       d  UR                  U5        [        SS5       H]  n	SU	-  S-   U-   n
[        [        U
5      (       d  UR                  U
5        UR                  U
5      (       a  ML  UR                  U
5        M_     M     U R                  U/ 5        U R                  U/ 5        g )Nc                        \ rS rSrSrSr/ rSrg)+TestShadow.test_most_types.<locals>.Context[   F    N)__name__
__module____qualname____firstlineno__cpplanguage_levelfuture_directives__static_attributes__rX   r+   r(   ContextrU   [   s    CN "r+   ra   objectr   rE   rF   rG   )r   r0   _contextr   init_threadr   modifiers_and_name_to_typeitemsr   r   r   lookup_typerK   r   )r   r4   ra   r5   missing_lookupssignedlongnessrN   type_rO   rP   s              r(   test_most_typesTestShadow.test_most_typesU   s!    #66t<	# 	# !(/9/T/T/Z/Z/\+$Vtx64(($$T*++D11&&t,Q{9s?T1vx00!((2#//99#**84 # 0] 	+"-r+   rX   N)	rY   rZ   r[   r\   r)   r7   rQ   rl   r`   rX   r+   r(   r	   r	      s    !/F,$,2.r+   r	   )
unittestCythonr   Cython.Compilerr   r   r   r   TestCaser	   rX   r+   r(   <module>rr      s%      D Dl."" l.r+   