
    i                     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      t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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staticmethod__getattr____getattribute__)r   directive_typeskeyssplitdirective_scopesgetlenhasattrr   appendgetattrtypeassertEqual)	selfmissing_directivesextra_directivesfull_directive	directiverestscopedirective_valuesubdirectives	            W/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/Cython/Tests/TestShadow.pytest_all_directives_in_shadow(TestShadow.test_all_directives_in_shadow   s   %55::<N-33C8I,,00@EUqU1X-A69--$++N;/ 69--")).9")&)"<$(L_ 5}EE#D$9;MNN	 %)% =. 	+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   r3   int_namesignnameptrptr_names          r&   test_int_types_in_shadow#TestShadow.test_int_types_in_shadow6   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>.ContextU   F    N)__name__
__module____qualname____firstlineno__cpplanguage_levelfuture_directives__static_attributes__rV   r)   r&   ContextrS   U   s    CN "r)   r_   objectr   rC   rD   rE   )r   r.   _contextr   init_threadr   modifiers_and_name_to_typeitemsr   r   r   lookup_typerI   r   )r   r2   r_   r3   missing_lookupssignedlongnessrL   type_rM   rN   s              r&   test_most_typesTestShadow.test_most_typesO   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)   rV   N)	rW   rX   rY   rZ   r'   r5   rO   rj   r^   rV   r)   r&   r	   r	      s    /:,$,2.r)   r	   )
unittestCythonr   Cython.Compilerr   r   r   r   TestCaser	   rV   r)   r&   <module>rp      s%      D Df."" f.r)   