← Back
Editing: test_return_real.cpython-311.pyc
� ���c � �v � d dl Z d dlZd dlZd dlmZ ddlmZ G d� dej � � Zej � e j � � dk d� � � ej � ej ej � � j d k d� � � G d� d e� � � � � � Z G d� de� � ZdS )� N)�array� )�utilc � � e Zd Zd� ZdS )�TestReturnRealc �v � |dv rd}nd}t |d� � dz � � |k sJ �t |d� � dz � � |k sJ �t |d� � dz � � |k sJ �t |d� � dz � � |k sJ �t |d � � dz � � |k sJ �t |dg� � dz � � |k sJ �t |d � � dz � � |k sJ �t |t d� � � � dz � � |k sJ �t |t dg� � � � dz � � |k sJ �t |t dgg� � � � dz � � |k sJ �t |t dg� � � d� � � � dz � � |k sJ �t |t dgd � � � � dz � � |k sJ �t |t dgd� � � � dz � � |k sJ �t |t dgd� � � � dz � � |k sJ �t |t dgd� � � � dz � � |k sJ �t |t dgd� � � � dz � � |k sJ �t |t dgd� � � � dz � � |k sJ �|dv r |d� � |d� � k sJ �t j t |d� � t j t |g � � t j t |d� � t j t ||� � t j t |i � � |ddz � � }t |� � dv sJ �d S # t $ r Y d S w xY w)N)�t0�t4�s0�s4g�h㈵��>g �� g @m@g33333Sm@�234z234.6i���)r �b� �h�i�l�B�f�dgZb���tig�u �<�7~�abc� � i� )�inf�Infinity) �absr �astype�pytest�raises� ValueError� IndexError� Exception�repr� OverflowError)�self�t�tname�err�rs �C/usr/lib/python3/dist-packages/numpy/f2py/tests/test_return_real.py�check_functionzTestReturnReal.check_function s � ��,�,�,��C�C��C��1�1�S�6�6�E�>�"�"�c�)�)�)�)��1�1�U�8�8�e�#�$�$��+�+�+�+��1�1�U�8�8�c�>�"�"�c�)�)�)�)��1�1�W�:�:��%�&�&�#�-�-�-�-��1�1�T�7�7�S�=�!�!�S�(�(�(�(��1�1�c�U�8�8�c�>�"�"�c�)�)�)�)��1�1�W�:�:��%�&�&�#�-�-�-�-��1�1�U�3�Z�Z�=�=�5�(�)�)�S�0�0�0�0��1�1�U�C�5�\�\�?�?�U�*�+�+�s�2�2�2�2��1�1�U�S�E�7�^�^�$�$�u�,�-�-��4�4�4�4��1�1�U�C�5�\�\�(�(��-�-�.�.��3�4�4��;�;�;�;��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��1�1�U�C�5�#�&�&�'�'�%�/�0�0�C�7�7�7�7��,�,�,��1�U�8�8�q�q��x�x�'�'�'�'� � �j�!�U�+�+�+�� �j�!�R�(�(�(�� �j�!�R�(�(�(�� �i��A�&�&�&�� �i��B�'�'�'� ���"�c�'� � �A���7�7�1�1�1�1�1�1�1��� � � ��D�D� ���s �!N* �* N8�7N8N)�__name__� __module__�__qualname__r+ r � r* r r s# � � � � � �&� &� &� &� &r/ r �DarwinzVProne to error when run with numpy/f2py/tests on mac os, but not when run in isolation)�reason� z32-bit builds are buggyc � � e Zd ZdZdZdZej � dd� d� � � � d� � � Z dS ) �TestCReturnRealz.pyf�c_ext_return_realax python module c_ext_return_real usercode ''' float t4(float value) { return value; } void s4(float *t4, float value) { *t4 = value; } double t8(double value) { return value; } void s8(double *t8, double value) { *t8 = value; } ''' interface function t4(value) real*4 intent(c) :: t4,value end function t8(value) real*8 intent(c) :: t8,value end subroutine s4(t4,value) intent(c) s4 real*4 intent(out) :: t4 real*4 intent(c) :: value end subroutine s8(t8,value) intent(c) s8 real*8 intent(out) :: t8 real*8 intent(c) :: value end end interface end python module c_ext_return_real �namezt4,t8,s4,s8�,c �X � | � t | j |� � |� � d S �N�r+ �getattr�module�r% r6 s r* �test_allzTestCReturnReal.test_all\ �* � ����G�D�K��6�6��=�=�=�=�=r/ N)r, r- r. �suffix�module_name�coder �mark�parametrize�splitr>