
    -Ph                     d    d dl mZ  G d de          Zedk    rd dlZ ej                     dS dS )    )
CythonTestc                   n    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd ZdS )TestCodeWriterc                 b    |                      ||                     |          j                   d S )N)
assertCodefragmentroot)selfcodestrs     [/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/Cython/Tests/TestCodeWriter.pytzTestCodeWriter.t   s+    w!7!7!<=====    c                 0    |                      d           d S )Nz
                    print(x + y ** 2)
                    print(x, y, z)
                    print(x + y, x + y * z, x * (y + z))
               r   r
   s    r   
test_printzTestCodeWriter.test_print   s'      	 	 	 	 	r   c                 0    |                      d           d S )Nzif x:
    passr   r   s    r   test_ifzTestCodeWriter.test_if   s     !!!!!r   c                 0    |                      d           d S )Na   
                    if x:
                        pass
                    elif y:
                        pass
                    elif z + 34 ** 34 - 2:
                        pass
                    else:
                        pass
                r   r   s    r   test_ifelifelsezTestCodeWriter.test_ifelifelse   s'     	 		 		 		 		 		r   c                 0    |                      d           d S )Nz
                    def f(x, y, z):
                        pass
                    def f(x = 34, y = 54, z):
                        pass
               r   r   s    r   test_defzTestCodeWriter.test_def*   s'      	 	 	 	 	r   c                 0    |                      d           d S )Na  
                    cdef f(x, y, z):
                        pass
                    cdef public void (x = 34, y = 54, z):
                        pass
                    cdef f(int *x, void *y, Value *z):
                        pass
                    cdef f(int **x, void **y, Value **z):
                        pass
                    cdef inline f(int &x, Value &z):
                        pass
               r   r   s    r   	test_cdefzTestCodeWriter.test_cdef2   s'      	 	 	 	 	r   c                 0    |                      d           d S )Nz8def f(unsigned long long long long long int y):
    passr   r   s    r   test_longness_and_signednessz+TestCodeWriter.test_longness_and_signedness@   s    JKKKKKr   c                 0    |                      d           d S )Nz#def f(signed short int y):
    passr   r   s    r   test_signed_shortz TestCodeWriter.test_signed_shortC   s    566666r   c                 0    |                      d           d S )Nz+def f(int x, unsigned long int y):
    passr   r   s    r   test_typed_argszTestCodeWriter.test_typed_argsF   s    =>>>>>r   c                 0    |                      d           d S )Nzh
                    cdef int hello
                    cdef int hello = 4, x = 3, y, z
                r   r   s    r   test_cdef_varzTestCodeWriter.test_cdef_varI   s'      	 	 	 	 	r   c                 Z    |                      d           |                      d           d S )Nz
                    for x, y, z in f(g(h(34) * 2) + 23):
                        print(x, y, z)
                    else:
                        print(43)
                z
                    for abc in (1, 2, 3):
                        print(x, y, z)
                    else:
                        print(43)
                r   r   s    r   test_for_loopzTestCodeWriter.test_for_loopO   sD      	 	 	 	  	 	 	 	 	r   c                 0    |                      d           d S )Nz
                    while True:
                        while True:
                            while True:
                                continue
                r   r   s    r   test_while_loopzTestCodeWriter.test_while_loop]   s'      	 	 	 	 	r   c                 0    |                      d           d S )Nzx += 43r   r   s    r   test_inplace_assignmentz&TestCodeWriter.test_inplace_assignmente   s    yr   c                 0    |                      d           d S )Nzx = y = z = abc = 43r   r   s    r   test_cascaded_assignmentz'TestCodeWriter.test_cascaded_assignmenth   s    %&&&&&r   c                 0    |                      d           d S )Nza.xr   r   s    r   test_attributezTestCodeWriter.test_attributek   s    ur   c                 0    |                      d           d S )Na  
                    def f(x, y, z):
                        return
                    cdef f(x, y, z):
                        return
                    def f(x, y, z):
                        return None
                    cdef f(x, y, z):
                        return None
                    def f(x, y, z):
                        return 1234
                    cdef f(x, y, z):
                        return 1234
               r   r   s    r   test_return_nonezTestCodeWriter.test_return_nonen   s'      	 	 	 	 	r   N)__name__
__module____qualname__r   r   r   r   r   r   r   r   r    r"   r$   r&   r(   r*   r,   r.    r   r   r   r      s       > > >  " " "
 
 
    L L L7 7 7? ? ?        ' ' '      r   r   __main__N)Cython.TestUtilsr   r   r/   unittestmainr2   r   r   <module>r7      sy    ' ' ' ' ' 'y y y y yZ y y yv zOOOHMOOOOO r   