403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/numpy/f2py/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/numpy/f2py/tests/__pycache__/test_character.cpython-312.pyc
�

	�gX��T�ddlZddlZddlmZmZmZddlZddlm	Z	ejjGd�de	j��Z
Gd�de	j�ZGd�d	e	j�ZGd
�de	j�ZGd�d
e	j�ZejjGd�de	j��ZejjGd�de	j��ZejjGd�de	j��Zy)�N)�assert_array_equal�assert_equal�
assert_raises)�utilc��eZdZdZdZgd�ZdZeD]�ZeZe	d��jee�Zeejdjgd�e��d�e��d	�e��d
�e��d�e��d�e��d�e��d	�e��d�e��d�e��d�e��d
�e��d�e��d�e��d
�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d���z
Z��ej j#de�d��Zej j#dedd�d��Zej j#de�d��Zej j#de�d��Zej j#de�d��Zy)�TestCharacterString�.f90�test_character_string��1�3�star��(*))rz

        subroutine �_input_z(c, o, n)
          character*z�, intent(in) :: c
          integer n
          !f2py integer, depend(c), intent(hide) :: n = slen(c)
          integer*1, dimension(n) :: o
          !f2py intent(out) o
          o = transfer(c, o)
        end subroutine �_output_z�, intent(out) :: c
          integer n
          integer*1, dimension(n), intent(in) :: o
          !f2py integer, depend(o), intent(hide) :: n = len(o)
          c = transfer(o, c)
        end subroutine �
_array_input_z;(c, o, m, n)
          integer m, i, n
          character*aH, intent(in), dimension(m) :: c
          !f2py integer, depend(c), intent(hide) :: m = len(c)
          !f2py integer, depend(c), intent(hide) :: n = f2py_itemsize(c)
          integer*1, dimension(m, n), intent(out) :: o
          do i=1,m
            o(i, :) = transfer(c(i), o(i, :))
          end do
        end subroutine �_array_output_z!(c, o, m, n)
          character*a, intent(out), dimension(m) :: c
          integer n
          integer*1, dimension(m, n), intent(in) :: o
          !f2py character(f2py_len=n) :: c
          !f2py integer, depend(o), intent(hide) :: m = len(o)
          !f2py integer, depend(o), intent(hide) :: n = shape(o, 1)
          do i=1,m
            c(i) = transfer(o(i, :), c(i))
          end do
        end subroutine �_2d_array_input_zH(c, o, m1, m2, n)
          integer m1, m2, i, j, n
          character*a�, intent(in), dimension(m1, m2) :: c
          !f2py integer, depend(c), intent(hide) :: m1 = len(c)
          !f2py integer, depend(c), intent(hide) :: m2 = shape(c, 1)
          !f2py integer, depend(c), intent(hide) :: n = f2py_itemsize(c)
          integer*1, dimension(m1, m2, n), intent(out) :: o
          do i=1,m1
            do j=1,m2
              o(i, j, :) = transfer(c(i, j), o(i, j, :))
            end do
          end do
        end subroutine z	
        �lengthc��ddij||�}t|j|jdz|z�}dddd�|}t	||�tjttt|��d�	��y)
Nrrr�a�abc�abcdeabcdeabcder�u1��dtype)
�get�getattr�module�fprefixr�np�array�list�map�ord��selfr�fsuffix�frs     �AC:\Python312\Lib\site-packages\numpy/f2py/tests/test_character.py�
test_inputzTestCharacterString.test_inputMsk���&�/�%�%�f�f�5���D�K�K����	�!9�G�!C�D���E�;�7��?���1�Q�4����$�s�3��{�*;�4�!H�I�N���c��|}t|j|jdz|z�}ddd�|}t|t	j
t
tt|��d���|j��y)Nrrr)rr
rr)
rr r!rr"r#r$r%r&�encoder's     r+�test_outputzTestCharacterString.test_outputVsb�����D�K�K����
�!:�W�!D�E���E�"�6�*���1�R�X�X�d�3�s�A�;�&7�t�D�E��8�8�:�	'r-c�,�|}t|j|jdz|z�}tjdddd�|dddd�|gd	�
�}tj|D�cgc]
}t|���c}d�
�}t
||�|�ycc}w)Nrrrrr�A�ABC�ABCDEABCDEABCDE�Srr�rr r!r"r#r$r)r(rr)r*r�s�expecteds       r+�test_array_inputz$TestCharacterString.test_array_input`s������D�K�K�����!?�'�!I�J���H�H�C�e�[�A�&�I��e�[�A�&�I��"�
$���8�8�a�0��T�!�W�0��=���1�Q�4��*��1��#Bc�,�|}t|j|jdz|z�}tjdddd�|dddd�|gd	�
�}tj|D�cgc]
}t|���c}d�
�}t
||�|�ycc}w)Nrrrrrr3r4r5r6rrr7)r(rr)r*r9r8rs       r+�test_array_outputz%TestCharacterString.test_array_outputls������D�K�K����0@�!@�7�!J�K���8�8��U�K�
8��
@��U�K�
8��
@�
B�IL�N��
�H�H�x�0�!�d�1�g�0��=���1�Q�4��*��1r;c�~�|}t|j|jdz|z�}tjdddd�|dddd�|gd	d
dd�|dd
dd�|ggd��}tj|D��cgc]}|D�cgc]
}t|���c}��c}}dd��}t
||�|�ycc}wcc}}w)Nrrrrrr3r4r5r*�fgh�fghijfghijfghij�F�FGH�FGHIJFGHIJFGHIJr6rr�r�orderr7)r(rr)r*r�row�itemr9s        r+�test_2d_array_inputz'TestCharacterString.test_2d_array_inputxs������D�K�K����0B�!B�W�!L�M���H�H�S�u�k�B�6�J� �u�k�B�6�J�L� �u�k�B�6�J� �u�k�B�6�J�L�M��	
 ��
�8�8�Q�G�c�S�9�T�d�4�j�9�G�"&�c�3���1�Q�4��*��:��Gs�6	B9
�?B4�B9
�4B9
)�__name__�
__module__�__qualname__�suffixr!�length_list�coderr)�dictr�clength�textwrap�dedent�join�pytest�mark�parametrizer,r1r:r=rH�r-r+rrsm���F�%�G�$�K�
�D��;
�����E�"�&�&�v�v�6�������7!�7!�%�7!��9�7!�#�7!�$+�9�7!�-�7!��I�7!��7!� �y�7!�!(�7!�)0�y�7!�1�7!��9�7!�%�7!�&-�I�7!�.�7!��I�7!��7!�" �y�#7!�"!)�#7!�"*1�	�#7!�"2�#7!�&�9�'7!�&*�'7!�&+2��'7!�&3�'7!�*�I�+7!�*�+7!�8 �y�97!�8!.�97!�8/6�Y�97!�87�97!�<�9�=7!�<+�=7!�<,3�)�=7!�<4�=7!�>�I�?7!�>	�?7!�P �y�Q7!�P!/�Q7!�P07�i�Q7!�P8�Q7!�T�9�U7!�T-�U7!�T.5�I�U7!�T6�U7!�X�I�Y7!�X
�Y7!�l �y�m7!�l!1�m7!�l29�	�m7!�l:	�m7!�7
�7	
��	;
�z�[�[���X�{�3�J�4�J��[�[���X�{�3�B�'7�8�'�9�'��[�[���X�{�3�	+�4�	+��[�[���X�{�3�	+�4�	+��[�[���X�{�3�+�4�+r-rc�l�eZdZdZdZejdjgd�e��d�e��d�e��d�e��d�e��d	�e��d
�e��d�e��d�e��d
�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d�e��d���Ze	jjdddg�d ��Zd!�Z
e	jjdgd"��d#��Zd$�Ze	jjdgd"��d%��Zd&�Zd'�Zd(�Ze	jjdddg�d)��Zd*�Ze	jjdddg�d+��Ze	jjdddg�d,��Zd-�Ze	jj3d.�d/��Zd0�Zy1)2�
TestCharacterr	�test_characterr�
       subroutine z�_input(c, o)
          character, intent(in) :: c
          integer*1 o
          !f2py intent(out) o
          o = transfer(c, o)
       end subroutine z_input

       subroutine z�_output(c, o)
          character :: c
          integer*1, intent(in) :: o
          !f2py intent(out) c
          c = transfer(o, c)
       end subroutine z_output

       subroutine z�_input_output(c, o)
          character, intent(in) :: c
          character o
          !f2py intent(out) o
          o = c
       end subroutine z!_input_output

       subroutine z�_inout(c, n)
          character :: c, n
          !f2py intent(in) n
          !f2py intent(inout) c
          c = n
       end subroutine z_inout

       function z�_return(o) result (c)
          character :: c
          character, intent(in) :: o
          c = transfer(o, c)
       end function z_return

       subroutine z�_array_input(c, o)
          character, intent(in) :: c(3)
          integer*1 o(3)
          !f2py intent(out) o
          integer i
          do i=1,3
            o(i) = transfer(c(i), o(i))
          end do
       end subroutine z _array_input

       subroutine a'_2d_array_input(c, o)
          character, intent(in) :: c(2, 3)
          integer*1 o(2, 3)
          !f2py intent(out) o
          integer i, j
          do i=1,2
            do j=1,3
              o(i, j) = transfer(c(i, j), o(i, j))
            end do
          end do
       end subroutine z#_2d_array_input

       subroutine z�_array_output(c, o)
          character :: c(3)
          integer*1, intent(in) :: o(3)
          !f2py intent(out) c
          do i=1,3
            c(i) = transfer(o(i), c(i))
          end do
       end subroutine z!_array_output

       subroutine z�_array_inout(c, n)
          character :: c(3), n(3)
          !f2py intent(in) n(3)
          !f2py intent(inout) c(3)
          do i=1,3
            c(i) = n(i)
          end do
       end subroutine z _array_inout

       subroutine a _2d_array_inout(c, n)
          character :: c(2, 3), n(2, 3)
          !f2py intent(in) n(2, 3)
          !f2py intent(inout) c(2. 3)
          integer i, j
          do i=1,2
            do j=1,3
              c(i, j) = n(i, j)
            end do
          end do
       end subroutine z!_2d_array_inout

       function z�_array_return(o) result (c)
          character, dimension(3) :: c
          character, intent(in) :: o(3)
          do i=1,3
            c(i) = o(i)
          end do
       end function z_array_return

       function z�_optional(o) result (c)
          character, intent(in) :: o
          !f2py character o = "a"
          character :: c
          c = o
       end function z_optional
    r�c�S1c�0�t|j|jdz�}t|t	j
d|���t
d��t|t	j
d|���t
d��t|t	j
dg|���t
d��t|t	j
d|���t
d��t|t	j
dgg|���t
d��y)N�_inputrr�ar)rr r!rr"r#r&�r(rr*s   r+r,zTestCharacter.test_input�s����D�K�K�����!8�9���Q�r�x�x��5�1�2�C��H�=��Q�r�x�x��E�2�3�S��X�>��Q�r�x�x���U�3�4�c�#�h�?��Q�r�x�x��U�3�4�c�#�h�?��Q�r�x�x�#���u�5�6��C��Ar-c��t|j|jdz�}t|d�t	d��t|d�t	d��t|d�d�t|d�d�t|d�d�t|d�t	d��t|d	�t	d��t|dg�t	d��t|tjd��t	d��t|tjdg��t	d��tjd�}t||�t	d��tjdg�}t||�t	d��	|g�t|j�d
���#t$r%}t|�jd�s�Yd}~nd}~wwxYw	|d�t|j�d
���#t$r%}t|�jd�s�Yd}~yd}~wwxYw)Nr_rr`rrr-��absabz! should have failed on empty listz got 0-list�az  should have failed on int valuez got int instance)
rr r!rr&r"r#�SystemErrorrI�
IndexError�str�endswith�	TypeError�r(r*r�msgs    r+�test_input_variazTestCharacter.test_input_varia�s����D�K�K�����!8�9���Q�s�V�S��X�&��Q�t�W�c�$�i�(��Q�r�U�A���Q�s�V�Q���Q�u�X�q�!��Q�t�W�c�#�h�'��Q�u�X�s�3�x�(��Q��u�X�s�3�x�(��Q�r�x�x��~�&��C��1��Q�r�x�x���'�(�#�c�(�3��H�H�S�M���Q�q�T�3�s�8�$��H�H�c�U�O���Q�q�T�3�s�8�$�	P�
�b�E�
�����,M�N�O�O��	�	��s�8�$�$�]�3��4��	��	O�
�b�E�
�����,L�M�N�N��	�	��s�8�$�$�%8�9��:��	�s0�!G�	G/�
G*�*G/�3H�	I�H<�<I)r\r]�U1c��t|j|jdz�}t|t	j
gd�|���t	j
t
ttd��d���t|t	j
gd�|���t	j
t
ttd��d���y)N�_array_input�r�br\rr�i1�r`�b�c)	rr r!rr"r#r$r%r&ras   r+r:zTestCharacter.test_array_input s����D�K�K�����!>�?���1�R�X�X�o�U�C�D��8�8�D��S�%��$9��F�	H��1�R�X�X�&8��F�G��8�8�D��S�%��$9��F�	Hr-c���t|j|jdz�}t|gd��t	j
t
ttd��d���t|gd��t	j
t
ttd��d���	|gd��t|j�d���#t$r%}t|�jd	�s�Yd}~yd}~wwxYw)
Nrprqrrsrrt�rrrr\�d�" should have failed on wrong input�)th dimension must be fixed to 3 but got 4)rr r!rr"r#r$r%r&rfrI�
ValueErrorrhri)r(r*rls   r+�test_array_input_variaz$TestCharacter.test_array_input_varia)s����D�K�K�����!>�?���1�_�-��8�8�D��S�%��$9��F�	H��1�/�0��8�8�D��S�%��$9��F�	H�	C�
�"�#���:�:�,�@�A�C�
C���	��s�8�$�$�?�A��A��	�s�%
C�	C5�C0�0C5c��t|j|jdz�}tjgd�gd�g|d��}|j|dk(rtjntj�}t||�|�y)N�_2d_array_inputrq�ry�er*rArDrn)	rr r!r"r#�view�uint32�uint8r)r(rr*rr9s     r+rHz!TestCharacter.test_2d_array_input:sf���D�K�K����0A�!A�B���H�H�o�%�'�.3�3�
@���6�6�u��}�"�)�)�"�(�(�C���1�Q�4��*r-c��t|j|jdz�}t|t	d��d�t|d�d�y)N�_outputr`rrc)rr r!rr&�r(r*s  r+r1zTestCharacter.test_outputCs;���D�K�K����	�!9�:���Q�s�4�y�\�4�(��Q�q�T�5�!r-c
���t|j|jdz�}t|t	ttd���tjt	d�d���y)N�
_array_outputrr]r)	rr r!rr$r%r&r"r#r�s  r+r=zTestCharacter.test_array_outputIsG���D�K�K�����!?�@���1�T�#�c�5�/�2�3��8�8�D��K�t�<�	>r-c��t|j|jdz�}t|d�d�t|d�d�t|d�d�y)N�
_input_outputr`rrrc�rr r!rr�s  r+�test_input_outputzTestCharacter.test_input_outputOsE���D�K�K�����!?�@���Q�t�W�d�#��Q�s�V�T�"��Q�r�U�E�"r-c��t|j|jdz�}tjtd�|��}||d�t
|tjtd�|j���||ddd�t
|tjtd�|j���tjdg|��}||d�t
|tjdg|j���y)	N�_inoutrrr3�Abc��B�ABc)rr r!r"r#r$rr)r(rr*rs    r+�
test_inoutzTestCharacter.test_inoutVs����D�K�K�����!8�9���H�H�T�%�[��.��	�!�S�	��1�b�h�h�t�E�{�!�'�'�B�C�	�!�A�B�%��
��1�b�h�h�t�E�{�!�'�'�B�C��H�H�e�W�E�*��	�!�S�	��1�b�h�h��w�a�g�g�>�?r-c��t|j|jdz�}tjdd��}||d�t|tjd|j���tjdgd��}||d�t|tjdg|j���	|dd�t|j�d���#t$r%}t|�jd�s�Yd}~yd}~wwxYw)	Nr�r�S3rr3r�z  should have failed on str valuez
 got 3-str)rr r!r"r#rrrfrIr|rhrirks    r+�test_inout_variazTestCharacter.test_inout_variads����D�K�K�����!8�9���H�H�U�$�'��	�!�S�	��1�b�h�h�u�A�G�G�<�=��H�H�e�W�D�)��	�!�S�	��1�b�h�h��w�a�g�g�>�?�	O�
�e�S�M�
�����,L�M�N�N��	�	��s�8�$�$�\�2��3��	�s�=	C�	D�'D�Dc���t|j|jdz�}tjgd�|d��}tjgd�|d��}|||�t||�tjgd�|��}||dd|�t|tjgd	�|���tjgd�g|d��}|||�t|tjgd�g|���tjgd�|d��}	|||�t
|j�d
���#t$r%}t|�jd�s�Yd}~yd}~wwxYw)N�_array_inout�r3r��CrArDrqrxrr�)rr3r�r�rzr{)rr r!r"r#rrfrIr|rhri)r(rr*�nrrls      r+�test_array_inoutzTestCharacter.test_array_inoutvs1���D�K�K�����!>�?���H�H�_�E��=���H�H�_�E��=��	�!�Q���1�a� ��H�H�)��7��	�!�A�B�%����1�b�h�h�';�5�I�J��H�H�o�&�e�3�?��	�!�Q���1�b�h�h��'8��F�G��H�H�)��c�B��	C�
�a��G���:�:�,�@�A�C�
C���	��s�8�$�$�?�A��A��	�s�	D9�9	E'�E"�"E'c���t|j|jdz�}tjgd�gd�g|d��}tjgd�gd�g|d��}|||�t||�y)N�_2d_array_inoutr�)�D�ErArArDrqr��rr r!r"r#r)r(rr*r�rs     r+�test_2d_array_inoutz!TestCharacter.test_2d_array_inout�sm���D�K�K����0A�!A�B���H�H�o�%�'� ��
-��
�H�H�o�%�'� ��
-��	
�!�Q���1�a� r-c�n�t|j|jdz�}t|d�d�y)N�_returnrr`r�r�s  r+�test_returnzTestCharacter.test_return�s)���D�K�K����	�!9�:���Q�s�V�T�"r-z*fortran function returning array segfaultsc��t|j|jdz�}tjtd�d��}t
||�|�y)N�
_array_returnrr]rr7)r(r*rs   r+�test_array_returnzTestCharacter.test_array_return�s=���D�K�K�����!?�@���H�H�T�%�[��-���1�Q�4��#r-c��t|j|jdz�}t|�d�t|d�d�y)N�	_optionalr`�Br�r�s  r+�
test_optionalzTestCharacter.test_optional�s5���D�K�K�����!;�<���Q�S�$���Q�t�W�d�#r-N)rIrJrKrLr!rQrRrSrNrTrUrVr,rmr:r}rHr1r=r�r�r�r�r�r��skipr�r�rWr-r+rYrY�s���
�F��G��8�?�?�e�e� �e��)�e��e��i�
e� �
e��)�e��e��i�e� �e��)�e��e�(�i�)e�( �)e�,�)�-e�,�-e�6�i�7e�6 �7e�:�	�;e�:�;e�B�I�Ce�B�Ce�F�)�Ge�F�Ge�V�i�We�V �We�Z�)�[e�Z
�[e�n�i�oe�n �oe�r�)�se�r�se�@�i�Ae�@ �Ae�D�)�Ee�D�Ee�R�i�Se�R �Se�V�)�We�V
�We�j�i�ke�j �ke�n�	�oe�n�oe�z�I�{e�z�{e�~�	�e�~�e�H�I�Ie�H�Ie�e	�D�N�[�[���W�s�D�k�2�B�3�B�!O�F�[�[���W�&7�8�H�9�H�C�"�[�[���W�&7�8�+�9�+�"�>�#��[�[���W�s�D�k�2�@�3�@�O�$�[�[���W�s�D�k�2�C�3�C�6�[�[���W�s�D�k�2�	!�3�	!�#�
�[�[���B�C�$�D�$�$r-rYc��eZdZdZdZejde�de�de�de�de�de�d	e�d
e�de�de�d
e�de�d��Zejjd��Zd�Zd�Z
d�Zejjdddg�d��Zy)�TestMiscCharacterr	�test_misc_characterr[a(_gh18684(x, y, m)
         character(len=5), dimension(m), intent(in) :: x
         character*5, dimension(m), intent(out) :: y
         integer i, m
         !f2py integer, intent(hide), depend(x) :: m = f2py_len(x)
         do i=1,m
           y(i) = x(i)
         end do
       end subroutine z_gh18684

       subroutine z�_gh6308(x, i)
         integer i
         !f2py check(i>=0 && i<12) i
         character*5 name, x
         common name(12)
         name(i + 1) = x
       end subroutine z_gh6308

       subroutine z�_gh4519(x)
         character(len=*), intent(in) :: x(:)
         !f2py intent(out) x
         integer :: i
         ! Uncomment for debug printing:
         !do i=1, size(x)
         !   print*, "x(",i,")=", x(i)
         !end do
       end subroutine z_gh4519

       pure function aq_gh3425(x) result (y)
         character(len=*), intent(in) :: x
         character(len=len(x)) :: y
         integer :: i
         do i = 1, len(x)
           j = iachar(x(i:i))
           if (j>=iachar("a") .and. j<=iachar("z") ) then
             y(i:i) = achar(j-32)
           else
             y(i:i) = x(i:i)
           endif
         end do
       end function z_gh3425

       subroutine aO_character_bc_new(x, y, z)
         character, intent(in) :: x
         character, intent(out) :: y
         !f2py character, depend(x) :: y = x
         !f2py character, dimension((x=='a'?1:2)), depend(x), intent(out) :: z
         character, dimension(*) :: z
         !f2py character, optional, check(x == 'a' || x == 'b') :: x = 'a'
         !f2py callstatement (*f2py_func)(&x, &y, z)
         !f2py callprotoargument character*, character*, character*
         if (y.eq.x) then
           y = x
         else
           y = 'e'
         endif
         z(1) = 'c'
       end subroutine z%_character_bc_new

       subroutine aG_character_bc_old(x, y, z)
         character, intent(in) :: x
         character, intent(out) :: y
         !f2py character, depend(x) :: y = x[0]
         !f2py character, dimension((*x=='a'?1:2)), depend(x), intent(out) :: z
         character, dimension(*) :: z
         !f2py character, optional, check(*x == 'a' || x[0] == 'b') :: x = 'a'
         !f2py callstatement (*f2py_func)(x, y, z)
         !f2py callprotoargument char*, char*, char*
          if (y.eq.x) then
           y = x
         else
           y = 'e'
         endif
         z(1) = 'c'
       end subroutine z_character_bc_old
    c��t|j|jdz�}tjddgd��}||�}t||�y)N�_gh18684�abcde�fghij�S5rr�)r(r*�x�ys    r+�test_gh18684zTestMiscCharacter.test_gh18684sE��
�D�K�K����
�!:�;���H�H�g�w�'�t�4��
�a�D���1�a� r-c��t|j|jdz�}t|jjj
jtjd��tt|jjj
�d�|dd�t|jjj
dd�|dd�t|jjj
dd	�y)
N�_gh6308r��r�rsabcde�12345�s12345)	rr r!r�_BLNK_�namerr"�lenr�s  r+�test_gh6308zTestMiscCharacter.test_gh6308
s����D�K�K����	�!9�:���T�[�[�'�'�,�,�2�2�B�H�H�T�N�C��S����+�+�0�0�1�2�6�	�'�1�
��T�[�[�'�'�,�,�Q�/��:�	�'�1�
��T�[�[�'�'�,�,�Q�/��:r-c�J�t|j|jdz�}dtdt	j
d���fdtdt	j
d���ft	jgd�d�	�td
t	j
d���fgd�td
t	j
d���fd
d
gtdt	j
d���ffD];\}}||�}|j�D]\}}tt||�|���=y)N�_gh4519rrWr])�shaper�text�S4)r�2r
r)�)rr��34�S2r)�)	rr r!rOr"rr#�itemsr)r(r*r�r9�r�k�vs       r+�test_gh4519zTestMiscCharacter.test_gh4519s����D�K�K����	�!9�:���d��2�8�8�D�>�:�;���B�b�h�h�t�n�=�>����/��6��D������7�9�!��D������7�9��b��4�d�"�(�(�4�.�A�B�D�
	/�K�A�x��!��A� ���(�
/���1��W�Q��]�A�.�
/�
	/r-c��t|j|jdz�}t|d�d�t|d�d�t|d�d�y)N�_gh3425�abCsABCrr-�abC12dsABC12Dr�r�s  r+�test_gh3425zTestMiscCharacter.test_gh3425(sG���D�K�K����	�!9�:��	�Q�u�X�v�&��Q�r�U�C� ��Q�x�[�)�,r-�state�new�oldc�&��t|j|jdz|z����\}}t|d�tt	|�d��d�\}}t|d�tt	|�d�tt�fd��y)N�_character_bc_r`r�rur�c����d�S)NrvrW)r*s�r+�<lambda>z5TestMiscCharacter.test_character_bc.<locals>.<lambda>=s����4��r-)rr r!rr�r�	Exception)r(r�r\rr*s    @r+�test_character_bcz#TestMiscCharacter.test_character_bc1st����D�K�K����0@�!@�5�!H�I���s���1��Q����S��V�Q����w���1��Q����S��V�Q���i��1r-N)rIrJrKrLr!rQrRrNrTrU�slowr�r�r�r�rVr�rWr-r+r�r��s��
�F�#�G��8�?�?� ��)���i� ��)���i� ��)���i� ��Y���I���)���i� ��)���i� �WL�L	�D�\�[�[���!��!�	;�/� -��[�[���W�u�e�n�5�2�6�2r-r�c�D�eZdZejdddd�gZd�Zd�Zy)�TestStringScalarArr�tests�src�stringzscalar_string.f90c���|jjj|jjjfD](}d}|j|k(sJ�d}|j
|k(r�(J�y)NrWz|S8)r �string_testr��string77r�r�r(�outr9s   r+�	test_charzTestStringScalarArr.test_charCsg���K�K�+�+�2�2��K�K�+�+�4�4�6�	)�C��H��9�9��(�(�(��H��9�9��(�(�(�	)r-c���|jjj|jjjfD](}d}|j|k(sJ�d}|j
|k(r�(J�y)N)r��z|S12)r r��strarr�strarr77r�rr�s   r+�
test_char_arrz!TestStringScalarArr.test_char_arrKsg���K�K�+�+�2�2��K�K�+�+�4�4�6�	)�C��H��9�9��(�(�(��H��9�9��(�(�(�	)r-N)rIrJrKr�getpath�sourcesr�r�rWr-r+r�r�@s&���t�|�|�G�U�H�6I�J�K�G�)�)r-r�c�>�eZdZejdddd�gZd�Zy)�TestStringAssumedLengthr�r�r�z	gh24008.fc�<�|jjdd�y)N�joe�bob)r �greet)r(s r+�test_gh24008z$TestStringAssumedLength.test_gh24008Vs�������%��'r-N)rIrJrKrr�r�r�rWr-r+r�r�Ss ���t�|�|�G�U�H�k�B�C�G�(r-r�c�>�eZdZejdddd�gZd�Zy)�TestStringOptionalInOutr�r�r�zgh24662.f90c�v�|jj�tjdd��}|jj|�d|j	�j�vsJ�t
jt�5d}|jj|�ddd�y#1swYyxYw)N�hi�S32rz
output string�Hi)	r �string_inout_optionalr"r#�tobytes�decoderT�raisesr�)r(r�aas   r+�test_gh24662z$TestStringOptionalInOut.test_gh24662]s������)�)�+��H�H�T��'�����)�)�!�,��!�)�)�+�"4�"4�"6�6�6�6�
�]�]�9�
%�	2��B��K�K�-�-�b�1�	2�	2�	2�s�B/�/B8N)rIrJrKrr�r�rrWr-r+r�r�Ys ���t�|�|�G�U�H�m�D�E�G�2r-r�c�j�eZdZejdddd�ejdddd�gZdZd�Zy)	�TestNewCharHandlingr�r�r�zgh25286.pyf�gh25286.f90�_char_handling_testc�H�|jjd�}|dk(sJ�y�N�Tr��r �charint�r(�infos  r+�test_gh25286z TestNewCharHandling.test_gh25286p�"���{�{�"�"�3�'���q�y��yr-N�rIrJrKrr�r��module_namerrWr-r+rrgs?��	����W�e�X�}�=�����W�e�X�}�=��G�(�K�r-rc�j�eZdZejdddd�ejdddd�gZdZd�Zy)	�TestBCCharHandlingr�r�r�zgh25286_bc.pyfrr	c�H�|jjd�}|dk(sJ�yrr
rs  r+rzTestBCCharHandling.test_gh25286}rr-NrrWr-r+rrts@��	����W�e�X�/?�@�����W�e�X�}�=��G�(�K�r-r)rTrQ�
numpy.testingrrr�numpyr"�numpy.f2py.testsrrUr��F2PyTestrrYr�r�r�r�rrrWr-r+�<module>rs��
��I�I��!������{+�$�-�-�{+��{+�|g$�D�M�M�g$�T	L2��
�
�L2�^)�$�-�-�)�&(�d�m�m�(������
2�d�m�m�
2��
2������
�$�-�-�
��
������
����
��
r-

Youez - 2016 - github.com/yon3zu
LinuXploit