HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/numpy/f2py/tests/__pycache__/test_compile_function.cpython-310.pyc
o

6��a��@s�dZddlZddlZddlZddlmZddlZddlZddl	m
Z
ddlmZdd�Z
ej�d	d
dgdd
g�ejjdd�dd���Zdd�Zdd�Zej�dddg�dd��ZdS)z0See https://github.com/numpy/numpy/pull/11937.

�N)�
import_module)�assert_equal�)�utilcCs,t��s	t�d�t��st�d�dSdS)NzNeeds C compilerzNeeds FORTRAN 77 compiler)r�has_c_compiler�pytest�skip�has_f77_compiler�r
r
�H/usr/lib/python3/dist-packages/numpy/f2py/tests/test_compile_function.py�setup_modules

�r�
extra_argsz--nooptz--debugz--noopt --debug�z$Imported module seems never deleted.)�reasonc

Cs�d}t��}t��}t��}tj�|tt�	��d�}|dfD]:}zt�
|�tjj
||||d�}Wt�
|�nt�
|�wt|d�tjdkrYt|�}|��}	t|	d�tj|=qdS)NzT
        integer function foo()
        foo = 10 + 5
        return
        end
    z.f)�
modulenamer
�	source_fnr�win32�)r�get_module_dir�get_temp_module_name�os�getcwd�path�join�str�uuid�uuid4�chdir�numpy�f2py�compiler�sys�platformr�foo�modules)
r
�fsource�moddir�modname�cwd�targetr�ret_val�return_check�calc_resultr
r
r�test_f2py_init_compiles.
�


��r-cCstj�d�}t|d�dS)N�invalidr)rrr r)r*r
r
r�test_f2py_init_compile_failureVsr/cCs8ztj}dt_tj�d�}t|d�W|t_dS|t_w)Nzdoes not existr.�)r!�
executablerrr r)�tempr*r
r
r�test_f2py_init_compile_bad_cmd]sr3r%z'program test_f2py
end program test_f2pys'program test_f2py
end program test_f2pyc	CsPt��}zt�t|��tjj|ddd�}t|d�Wt�|�dSt�|�w)N�test_compile_from_stringsz.f90)r�	extensionr)rrrrrrr r)�tmpdirr%r(r*r
r
rr4os�r4)�__doc__r!rr�	importlibrr�
numpy.f2pyr�
numpy.testingrrrr�mark�parametrize�leaks_referencesr-r/r3r4r
r
r
r�<module>s.	�9��