
    KhU                     T   S SK r S SKrS SKJrJrJr  S SKrS SKJ	r	  \ R                  R                   " S S\	R                  5      5       r " S S\	R                  5      r " S S	\	R                  5      r " S
 S\	R                  5      r " S S\	R                  5      r\ R                  R                   " S S\	R                  5      5       r\ R                  R                   " S S\	R                  5      5       r\ R                  R                   " S S\	R                  5      5       rg)    N)assert_array_equalassert_equalassert_raises)utilc                   
   \ rS rSrSrSr/ SQrSr\ H  r\r	\
" SS9R                  \\5      r\\R                  " SR                  / SP\ PS	P\	 PS
P\ PSP\ PS	P\	 PSP\ PSP\	 PS
P\ PSP\ PSP\	 PSP\ PSP\	 PSP\ PSP\ PSP\	 PSP\ PSP\	 PSP\ PSP\ PSP\	 PSP\ PSP\	 PSP\ PSP\ PSP\	 PSP5      5      -  rM     \R"                  R%                  S\5      S 5       r\R"                  R%                  S\SS 5      S 5       r\R"                  R%                  S\5      S 5       r\R"                  R%                  S\5      S 5       r\R"                  R%                  S\5      S 5       rS rg)!TestCharacterString   .f90test_character_string13star (*))r   z

        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                     SS0R                  X5      n[        U R                  U R                  S-   U-   5      nSSSS.U   n[	        U" U5      [
        R                  " [        [        [        U5      5      SS	95        g )
Nr   r   r   aabcabcdeabcdeabcder   u1dtype)
getgetattrmodulefprefixr   nparraylistmapordselfr   fsuffixfr   s        Q/var/www/html/env/lib/python3.13/site-packages/numpy/f2py/tests/test_character.py
test_inputTestCharacterString.test_inputM   si    &/%%f5DKK	!9G!CDE;7?1Q4$s3{*;4!HI    Nc                     Un[        U R                  U R                  S-   U-   5      nSSS.U   n[        U" [        R
                  " [        [        [        U5      5      SS95      UR                  5       5        g )Nr   r   r   )r   r   r   r   )
r    r!   r"   r   r#   r$   r%   r&   r'   encoder(   s        r,   test_outputTestCharacterString.test_outputV   sb    DKK
!:W!DEE"6*1RXXd3sA;&7tDE88:	'r/   c                 *   Un[        U R                  U R                  S-   U-   5      n[        R                  " SSSS.U   SSSS.U   /S	S
9n[        R                  " U Vs/ s H  n[        U5      PM     snSS
9n[        U" U5      U5        g s  snf )Nr   r   r   r   r   AABCABCDEABCDEABCDESr   r   r    r!   r"   r#   r$   r%   r   )r)   r   r*   r+   r   sexpecteds          r,   test_array_input$TestCharacterString.test_array_input`   s    DKK!?'!IJHHCe[A&Ie[A&I"$ 88a0aT!Wa0=1Q4* 1   "Bc                 *   Un[        U R                  U R                  S-   U-   5      n[        R                  " SSSS.U   SSSS.U   /S	S
9n[        R                  " U Vs/ s H  n[        U5      PM     snSS
9n[        U" U5      U5        g s  snf )Nr   r   r   r   r   r6   r7   r8   r9   r   r   r:   )r)   r   r*   r+   r<   r;   r   s          r,   test_array_output%TestCharacterString.test_array_outputl   s    DKK0@!@7!JK88UK8@UK8@BILN HHx0x!d1gx0=1Q4* 1r?   c                    Un[        U R                  U R                  S-   U-   5      n[        R                  " SSSS.U   SSSS.U   /S	S
SS.U   SSSS.U   //SS9n[        R                  " U VVs/ s H  oU Vs/ s H  n[        U5      PM     snPM      snnSSS9n[        U" U5      U5        g s  snf s  snnf )Nr   r   r   r   r   r6   r7   r8   r+   fghfghijfghijfghijFFGHFGHIJFGHIJFGHIJr9   r   r   r   orderr:   )r)   r   r*   r+   r   rowitemr<   s           r,   test_2d_array_input'TestCharacterString.test_2d_array_inputx   s    DKK0B!BW!LMHHSukB6J ukB6JL ukB6J ukB6JLM 	 
 88QGQcS9STd4jS9QG"&c31Q4* :Gs   5	B:
>B5B:
5B:
 )__name__
__module____qualname____firstlineno__suffixr"   length_listcoder   r*   dictr   clengthtextwrapdedentjoinpytestmarkparametrizer-   r3   r=   rA   rM   __static_attributes__rO   r/   r,   r   r      sf    F%G$KDE"&&vv6 7! 7! % 7!97!#7!$+97!-7! I7!7!  y7! !(7! )0y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  y97!8 !.97!8 /6Y97!8797!< 9=7!< +=7!< ,3)=7!<4=7!> I?7!>	?7!P  yQ7!P !/Q7!P 07iQ7!P8Q7!T 9U7!T -U7!T .5IU7!T6U7!X IY7!X
Y7!l  ym7!l !1m7!l 29	m7!l:	m7! 7 7		 z [[X{3J 4J [[X{3B'78' 9' [[X{3	+ 4	+ [[X{3	+ 4	+ [[X{3+ 4+r/   r   c                   t   \ rS rSrSrSr\R                  " SR                  / SP\ PSP\ PSP\ PSP\ PS	P\ PS
P\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP\ PSP5      5      r	\
R                  R                  SSS /5      S! 5       rS" r\
R                  R                  S/ S#Q5      S$ 5       rS% r\
R                  R                  S/ S#Q5      S& 5       rS' rS( rS) r\
R                  R                  SSS /5      S* 5       rS+ r\
R                  R                  SSS /5      S, 5       r\
R                  R                  SSS /5      S- 5       rS. r\
R                  R5                  S/5      S0 5       rS1 rS2rg3)4TestCharacter   r
   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           	         [        U R                  U R                  S-   5      n[        U" [        R
                  " SUS95      [        S5      5        [        U" [        R
                  " SUS95      [        S5      5        [        U" [        R
                  " S/US95      [        S5      5        [        U" [        R
                  " SUS95      [        S5      5        [        U" [        R
                  " S//US95      [        S5      5        g )N_inputr   r      ar   )r    r!   r"   r   r#   r$   r'   r)   r   r+   s      r,   r-   TestCharacter.test_input   s    DKK!89Qrxx512CH=QrxxE23SX>QrxxU34c#h?QrxxU34c#h?Qrxx#u56CAr/   c                    [        U R                  U R                  S-   5      n[        U" S5      [	        S5      5        [        U" S5      [	        S5      5        [        U" S5      S5        [        U" S5      S5        [        U" S5      S5        [        U" S5      [	        S5      5        [        U" S	5      [	        S5      5        [        U" S/5      [	        S5      5        [        U" [
        R                  " S5      5      [	        S5      5        [        U" [
        R                  " S/5      5      [	        S5      5        [
        R                  " S5      n[        U" U5      [	        S5      5        [
        R                  " S/5      n[        U" U5      [	        S5      5         U" / 5        [        UR                   S
35      e! [         a*  n[        U5      R                  S5      (       d  e  S nAOS nAff = f U" S5        [        UR                   S35      e! [         a*  n[        U5      R                  S5      (       d  e  S nAg S nAff = f)Nrh   r   ri   r   r   r/       abs   abz! should have failed on empty listz got 0-lista   z  should have failed on int valuez got int instance)r    r!   r"   r   r'   r#   r$   SystemErrorrP   
IndexErrorstrendswith	TypeErrorr)   r+   r   msgs       r,   test_input_variaTestCharacter.test_input_varia   s   DKK!89QsVSX&QtWc$i(QrUAQsVQQuXq!QtWc#h'QuXs3x(QuXs3x(Qrxx~&C1Qrxx'(#c(3HHSMQqT3s8$HHcUOQqT3s8$	PbE
 ,MNOO	  	s8$$]33 4		ObE
 ,LMNN	  	s8$$%899 :	s0   %G 
G9 G44G9=H 
I' II)re   rf   U1c                    [        U R                  U R                  S-   5      n[        U" [        R
                  " / SQUS95      [        R
                  " [        [        [        S5      5      SS95        [        U" [        R
                  " / SQUS95      [        R
                  " [        [        [        S5      5      SS95        g )N_array_inputr   bre   r   r   i1ri      b   c)	r    r!   r"   r   r#   r$   r%   r&   r'   rj   s      r,   r=   TestCharacter.test_array_input   s    DKK!>?1RXXoUCD88DS%$9F	H1RXX&8FG88DS%$9F	Hr/   c                    [        U R                  U R                  S-   5      n[        U" / SQ5      [        R
                  " [        [        [        S5      5      SS95        [        U" / SQ5      [        R
                  " [        [        [        S5      5      SS95         U" / SQ5        [        UR                   S35      e! [         a*  n[        U5      R                  S	5      (       d  e  S nAg S nAff = f)
Nr{   r|   r   r~   r   r   r   r}   re   d" should have failed on wrong input)th dimension must be fixed to 3 but got 4)r    r!   r"   r   r#   r$   r%   r&   r'   rp   rP   
ValueErrorrr   rs   )r)   r+   rv   s      r,   test_array_input_varia$TestCharacter.test_array_input_varia)  s    DKK!>?1_-88DS%$9F	H1/088DS%$9F	H	C"# ::,@AC C  	s8$$?A AA	s   !
C 
C7 C22C7c                    [        U R                  U R                  S-   5      n[        R                  " / SQ/ SQ/USS9nUR                  US:X  a  [        R                  O[        R                  5      n[        U" U5      U5        g )N_2d_array_inputr|   r   er+   rF   rI   ry   )	r    r!   r"   r#   r$   viewuint32uint8r   )r)   r   r+   r   r<   s        r,   rM   !TestCharacter.test_2d_array_input:  sf    DKK0A!ABHHo%'.33@66u}"))"((C1Q4*r/   c                     [        U R                  U R                  S-   5      n[        U" [	        S5      5      S5        [        U" S5      S5        g )N_outputri   r   rm   )r    r!   r"   r   r'   r)   r+   s     r,   r3   TestCharacter.test_outputC  s;    DKK	!9:Qs4y\4(QqT5!r/   c           
          [        U R                  U R                  S-   5      n[        U" [	        [        [        S5      5      5      [        R                  " [	        S5      SS95        g )N_array_outputr   rf   r   )	r    r!   r"   r   r%   r&   r'   r#   r$   r   s     r,   rA   TestCharacter.test_array_outputI  sG    DKK!?@1T#c5/2388DKt<	>r/   c                     [        U R                  U R                  S-   5      n[        U" S5      S5        [        U" S5      S5        [        U" S5      S5        g )N_input_outputri   r   r   rm   r    r!   r"   r   r   s     r,   test_input_outputTestCharacter.test_input_outputO  sE    DKK!?@QtWd#QsVT"QrUE"r/   c                 
   [        U R                  U R                  S-   5      n[        R                  " [        S5      US9nU" US5        [        U[        R                  " [        S5      UR                  S95        U" USS  S5        [        U[        R                  " [        S5      UR                  S95        [        R                  " S/US9nU" US5        [        U[        R                  " S/UR                  S95        g )	N_inoutr   r   r6   Abc   BABc)r    r!   r"   r#   r$   r%   r   r   )r)   r   r+   r   s       r,   
test_inoutTestCharacter.test_inoutV  s    DKK!89HHT%[.	!S	1bhhtE{!''BC	!AB%1bhhtE{!''BCHHeWE*	!S	1bhhwagg>?r/   c                    [        U R                  U R                  S-   5      n[        R                  " SSS9nU" US5        [        U[        R                  " SUR                  S95        [        R                  " S/SS9nU" US5        [        U[        R                  " S/UR                  S95         U" SS5        [        UR                   S35      e! [         a*  n[        U5      R                  S5      (       d  e  S nAg S nAff = f)	Nr   r   S3r   r6   r   z  should have failed on str valuez
 got 3-str)r    r!   r"   r#   r$   r   r   rp   rP   r   rr   rs   ru   s       r,   test_inout_variaTestCharacter.test_inout_variad  s    DKK!89HHU$'	!S	1bhhuAGG<=HHeWD)	!S	1bhhwagg>?	OeSM
 ,LMNN	  	s8$$\22 3	s   5	C 
D
  DD
c                    [        U R                  U R                  S-   5      n[        R                  " / SQUSS9n[        R                  " / SQUSS9nU" XC5        [        XC5        [        R                  " / SQUS9nU" USS  U5        [        U[        R                  " / S	QUS95        [        R                  " / SQ/USS9nU" XC5        [        U[        R                  " / SQ/US95        [        R                  " / SQUSS9n U" XC5        [        UR                   S
35      e! [         a*  n[        U5      R                  S5      (       d  e  S nAg S nAff = f)N_array_inoutr6   r   CrF   rI   r|   r   r   r   )r   r6   r   r   r   r   )r    r!   r"   r#   r$   r   rp   rP   r   rr   rs   )r)   r   r+   nr   rv   s         r,   test_array_inoutTestCharacter.test_array_inoutv  s/   DKK!>?HH_E=HH_E=	!1 HH)7	!AB%1bhh';5IJHHo&e3?	!1bhh'8FGHH)cB	CaG ::,@AC C  	s8$$?A AA	s   D' '
E1 EEc                     [        U R                  U R                  S-   5      n[        R                  " / SQ/ SQ/USS9n[        R                  " / SQ/ SQ/USS9nU" XC5        [        XC5        g )N_2d_array_inoutr   )DErF   rF   rI   r|   r   r    r!   r"   r#   r$   r   )r)   r   r+   r   r   s        r,   test_2d_array_inout!TestCharacter.test_2d_array_inout  si    DKK0A!ABHHo%' - HHo%' - 	
!1 r/   c                 n    [        U R                  U R                  S-   5      n[        U" S5      S5        g )N_returnr   ri   r   r   s     r,   test_returnTestCharacter.test_return  s)    DKK	!9:QsVT"r/   z*fortran function returning array segfaultsc                     [        U R                  U R                  S-   5      n[        R                  " [        S5      SS9n[        U" U5      U5        g )N_array_returnr   rf   r   r:   )r)   r+   r   s      r,   test_array_returnTestCharacter.test_array_return  s=    DKK!?@HHT%[-1Q4#r/   c                     [        U R                  U R                  S-   5      n[        U" 5       S5        [        U" S5      S5        g )N	_optionalri      Br   r   s     r,   test_optionalTestCharacter.test_optional  s5    DKK!;<QS$QtWd#r/   rO   N)rP   rQ   rR   rS   rT   r"   rY   rZ   r[   rV   r\   r]   r^   r-   rw   r=   r   rM   r3   rA   r   r   r   r   r   r   skipr   r   r_   rO   r/   r,   ra   ra      s   FG?? e e   e)ee ie e )ee ie e )ee( i)e( )e, )-e,-e6 i7e6 7e: 	;e:;eB ICeBCeF )GeFGeV iWeV WeZ )[eZ
[en ioen oer )serse@ iAe@ AeD )EeDEeR iSeR SeV )WeV
Wej ikej ken 	oenoez I{ez{e~ 	e~eH IIeHIe e	DN [[WsDk2B 3B!OF [[W&78H 9HC" [[W&78+ 9+"># [[WsDk2@ 3@O$ [[WsDk2C 3C6 [[WsDk2	! 3	!#
 [[BC$ D$$r/   ra   c                      \ rS rSrSrSr\R                  " S\ S\ S\ S\ S\ S	\ S
\ S\ S\ S\ S\ S\ S35      r\	R                  R                  S 5       rS rS rS r\	R                  R!                  SSS/5      S 5       rSrg)TestMiscCharacteri  r
   test_misc_characterrd   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                     [        U R                  U R                  S-   5      n[        R                  " SS/SS9nU" U5      n[        X#5        g )N_gh18684abcdefghijS5r   r   )r)   r+   xys       r,   test_gh18684TestMiscCharacter.test_gh18684  sC     DKK
!:;HHgw't4aD1 r/   c                    [        U R                  U R                  S-   5      n[        U R                  R                  R
                  R                  [        R                  " S5      5        [        [        U R                  R                  R
                  5      S5        U" SS5        [        U R                  R                  R
                  S   S5        U" SS5        [        U R                  R                  R
                  S   S	5        g )
N_gh6308r      r   r   s   abcde12345   s   12345)	r    r!   r"   r   _BLNK_namer   r#   lenr   s     r,   test_gh6308TestMiscCharacter.test_gh6308  s    DKK	!9:T[['',,22BHHTNCS++00126	'1T[['',,Q/:	'1T[['',,Q/:r/   c                 4   [        U R                  U R                  S-   5      nS[        S[        R
                  " S5      S94S[        S[        R
                  " S5      S94[        R                  " / SQSS	9[        S
[        R
                  " S5      S94/ SQ[        S
[        R
                  " S5      S94SS/[        S[        R
                  " S5      S944 H;  u  p#U" U5      nUR                  5        H  u  pV[        [        XE5      U5        M     M=     g )N_gh4519r   rO   rf   )shaper   textS4)r   2r   r   )   )r   r   34S2r   )   )	r    r!   r"   rW   r#   r   r$   itemsr   )r)   r+   r   r<   rkvs          r,   test_gh4519TestMiscCharacter.test_gh4519  s    DKK	!9: d288D>:;Bbhhtn=>/6D79!D79b4d"((4.ABDKA !A (WQ]A. )Dr/   c                     [        U R                  U R                  S-   5      n[        U" S5      S5        [        U" S5      S5        [        U" S5      S5        g )N_gh3425abCs   ABCr   r/   abC12ds   ABC12Dr   r   s     r,   test_gh3425TestMiscCharacter.test_gh3425(  sG    DKK	!9: 	QuXv&QrUC Qx[),r/   statenewoldc                 $  ^ [        U R                  U R                  S-   U-   5      mT" 5       u  p#[        US5        [        [	        U5      S5        T" S5      u  p#[        US5        [        [	        U5      S5        [        [        U4S j5        g )N_character_bc_ri   r   r   r   c                     > T " S5      $ )Nr   rO   )r+   s   r,   <lambda>5TestMiscCharacter.test_character_bc.<locals>.<lambda>=  s	    4r/   )r    r!   r"   r   r   r   	Exception)r)   r   re   r   r+   s       @r,   test_character_bc#TestMiscCharacter.test_character_bc1  sp    DKK0@!@5!HIsQSVQwQSVQi1r/   rO   N)rP   rQ   rR   rS   rT   r"   rY   rZ   rV   r\   r]   slowr   r   r   r   r^   r   r_   rO   r/   r,   r   r     s   F#G??  )  i  )  i  )  i  Y  I )  i  )  i  WL L	D\ [[! !	;/ - [[Wuen52 62r/   r   c                   L    \ rS rSr\R
                  " SSSS5      /rS rS rSr	g	)
TestStringScalarArri@  testssrcstringzscalar_string.f90c                     U R                   R                  R                  U R                   R                  R                  4 H+  nSnUR                  U:X  d   eSnUR
                  U:X  a  M+   e   g )NrO   z|S8)r!   string_testr  string77r   r   r)   outr<   s      r,   	test_charTestStringScalarArr.test_charC  sb    KK++22KK++446CH99(((H99(((6r/   c                     U R                   R                  R                  U R                   R                  R                  4 H+  nSnUR                  U:X  d   eSnUR
                  U:X  a  M+   e   g )N)r      z|S12)r!   r  strarrstrarr77r   r   r  s      r,   test_char_arr!TestStringScalarArr.test_char_arrK  sb    KK++22KK++446CH99(((H99(((6r/   rO   N)
rP   rQ   rR   rS   r   getpathsourcesr	  r  r_   rO   r/   r,   r   r   @  s$    ||GUH6IJKG))r/   r   c                   F    \ rS rSr\R
                  " SSSS5      /rS rSrg)	TestStringAssumedLengthiS  r  r  r  z	gh24008.fc                 <    U R                   R                  SS5        g )Njoebob)r!   greet)r)   s    r,   test_gh24008$TestStringAssumedLength.test_gh24008V  s    %'r/   rO   N)	rP   rQ   rR   rS   r   r  r  r  r_   rO   r/   r,   r  r  S  s    ||GUHkBCG(r/   r  c                   F    \ rS rSr\R
                  " SSSS5      /rS rSrg)	TestStringOptionalInOutiY  r  r  r  zgh24662.f90c                    U R                   R                  5         [        R                  " SSS9nU R                   R                  U5        SUR	                  5       R                  5       ;   d   e[        R                  " [        5         SnU R                   R                  U5        S S S 5        g ! , (       d  f       g = f)NhiS32r   zoutput stringHi)	r!   string_inout_optionalr#   r$   tobytesdecoder\   raisesr   )r)   r   aas      r,   test_gh24662$TestStringOptionalInOut.test_gh24662]  s    ))+HHT'))!,!))+"4"4"6666]]9%BKK--b1 &%%s   	B00
B>rO   N)	rP   rQ   rR   rS   r   r  r  r&  r_   rO   r/   r,   r  r  Y  s    ||GUHmDEG2r/   r  c                   r    \ rS rSr\R
                  " SSSS5      \R
                  " SSSS5      /rSrS rS	r	g
)TestNewCharHandlingig  r  r  r  zgh25286.pyfgh25286.f90_char_handling_testc                 J    U R                   R                  S5      nUS:X  d   eg NTr   r!   charintr)   infos     r,   test_gh25286 TestNewCharHandling.test_gh25286p  "    {{""3'qyyr/   rO   N
rP   rQ   rR   rS   r   r  r  module_namer3  r_   rO   r/   r,   r)  r)  g  s;     	WeX}=WeX}=G (Kr/   r)  c                   r    \ rS rSr\R
                  " SSSS5      \R
                  " SSSS5      /rSrS rS	r	g
)TestBCCharHandlingit  r  r  r  zgh25286_bc.pyfr*  r+  c                 J    U R                   R                  S5      nUS:X  d   eg r-  r/  r1  s     r,   r3  TestBCCharHandling.test_gh25286}  r5  r/   rO   Nr6  rO   r/   r,   r9  r9  t  s<     	WeX/?@WeX}=G (Kr/   r9  )r\   rY   numpy.testingr   r   r   numpyr#   numpy.f2py.testsr   r]   r   F2PyTestr   ra   r   r   r  r  r)  r9  rO   r/   r,   <module>r@     s     I I  ! {+$-- {+ {+|g$DMM g$T	L2 L2^)$-- )&(dmm ( 
2dmm 
2 
2 
$-- 
 
 
 
 
r/   