
    .|h                    4   d dl mZ d dl mZ d dlmZmZ d dlmZ d dlZd dl	m
Z
mZmZ d dlmZmZmZ d dlmZ d d	lmZ d d
lmZ d dlm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 Z*d Z+d Z,d  Z-d! Z.d" Z/d# Z0d$ Z1d% Z2d& Z3d' Z4d( Z5d) Z6d* Z7d+ Z8d, Z9d- Z:d. Z;d/ Z<d0 Z=d1 Z>d2 Z?d3 Z@d4 ZAd5 ZBd6 ZCd7 ZDd8 ZEd9 ZFd: ZGd; ZHd< ZId= ZJd> ZKd? ZLd@ ZMdA ZNdB ZOdC ZPdD ZQdE ZRdF ZSdG ZTdH ZUdI ZVdJ ZWdK ZXdL ZYdM ZZdN Z[dO Z\dP Z]dQ Z^dR Z_dS Z`dT ZadU ZbdV ZcdW ZddX ZedY ZfdZ Zgd[ Zhd\ Zi G d] d^ee
      Zjg d_Zkg d`Zlg daZm G db dcej      Zn G dd deej      Zo G df dgej      Zp G dh diej      Zqerdjk(  r ej                          yy)k    )product)permutations)njittypeof)typesN)TestCaseno_pyobj_flagsMemoryLeakMixin)TypingErrorUnsupportedErrorUnsupportedBytecodeError)_MAX_UNICODE)_header_lead)overload)	PYVERSIONc                 &    t        d | D              S )Nc              3   8   K   | ]  }t        |      d k    yw)   Nord).0cs     W/var/www/html/test/engine/venv/lib/python3.12/site-packages/numba/tests/test_unicode.py	<genexpr>zisascii.<locals>.<genexpr>   s     's1v|'s   )allss    r   isasciir      s    'Q'''    c                       yN   大处着眼，小处着手。 r#   r   r   literal_usecaser$      s    +r   c                     | S Nr#   xs    r   passthrough_usecaser)      s    Hr   c                     | |k(  S r&   r#   r(   ys     r   
eq_usecaser-          6Mr   c                     t        |       S r&   lenr'   s    r   len_usecaser2   !       q6Mr   c                     t        |       S r&   )boolr'   s    r   bool_usecaser6   %   s    7Nr   c                     | |   S r&   r#   r(   is     r   getitem_usecaser:   )   s    Q4Kr   c                     t        | |         S r&   )hashr8   s     r   getitem_check_kind_usecaser=   -   s    !:r   c                 $    | j                  |      S r&   )zfillr+   s     r   zfill_usecaser@   1       771:r   c                     | |z   S r&   r#   r+   s     r   concat_usecaserC   5       q5Lr   c                     | |z  S r&   r#   r+   s     r   repeat_usecaserF   9   rD   r   c                     | |z  } | S r&   r#   r+   s     r   inplace_concat_usecaserH   =   s    FAHr   c                 
    | |v S r&   r#   r+   s     r   
in_usecaserJ   B   s    6Mr   c                     | |k  S r&   r#   r+   s     r   
lt_usecaserL   F   rD   r   c                     | |k  S r&   r#   r+   s     r   
le_usecaserN   J   r.   r   c                     | |kD  S r&   r#   r+   s     r   
gt_usecaserP   N   rD   r   c                     | |k\  S r&   r#   r+   s     r   
ge_usecaserR   R   r.   r   c                 $    | j                  |      S r&   )	partitionr   seps     r   partition_usecaserW   V   s    ;;sr   c                 $    | j                  |      S r&   findr+   s     r   find_usecaser[   Z       66!9r   c                 &    | j                  ||      S r&   rY   r(   r,   starts      r   find_with_start_only_usecaser`   ^   s    66!Ur   c                 (    | j                  |||      S r&   rY   r(   r,   r_   ends       r   find_with_start_end_usecaserd   b   s    66!UC  r   c                 $    | j                  |      S r&   )
rpartitionrU   s     r   rpartition_usecaserg   f   s    <<r   c                 $    | j                  |      S r&   countr+   s     r   count_usecaserk   j   rA   r   c                 &    | j                  ||      S r&   ri   r^   s      r   count_with_start_usecaserm   n       771er   c                 (    | j                  |||      S r&   ri   rb   s       r   count_with_start_end_usecaserp   r       771eS!!r   c                 $    | j                  |      S r&   rfindr+   s     r   rfind_usecaseru   v   rA   r   c                 &    | j                  ||      S r&   rs   r^   s      r   rfind_with_start_only_usecaserw   z   rn   r   c                 (    | j                  |||      S r&   rs   rb   s       r   rfind_with_start_end_usecasery   ~   rq   r   c                 &    | j                  ||      S r&   replace)r   r(   r,   s      r   replace_usecaser}      s    99Q?r   c                 (    | j                  |||      S r&   r{   r   r(   r,   rj   s       r   replace_with_count_usecaser      s    99Q5!!r   c                 $    | j                  |      S r&   rindexr+   s     r   rindex_usecaser          88A;r   c                 &    | j                  ||      S r&   r   r^   s      r   rindex_with_start_only_usecaser      s    88Aur   c                 (    | j                  |||      S r&   r   rb   s       r   rindex_with_start_end_usecaser      s    88Auc""r   c                 $    | j                  |      S r&   indexr+   s     r   index_usecaser      rA   r   c                 &    | j                  ||      S r&   r   r^   s      r   index_with_start_only_usecaser      rn   r   c                 (    | j                  |||      S r&   r   rb   s       r   index_with_start_end_usecaser      rq   r   c                 $    | j                  |      S r&   
startswithr+   s     r   startswith_usecaser      s    <<?r   c                 $    | j                  |      S r&   endswithr+   s     r   endswith_usecaser      s    ::a=r   c                 "    | j                         S r&   
expandtabsr   s    r   expandtabs_usecaser          <<>r   c                 $    | j                  |      S r&   r   r   tabsizes     r   expandtabs_with_tabsize_usecaser      s    <<  r   c                 &    | j                  |      S )N)r   r   r   s     r   %expandtabs_with_tabsize_kwarg_usecaser      s    <<<((r   c                 &    | j                  ||      S r&   r   r^   s      r   "startswith_with_start_only_usecaser      s    <<5!!r   c                 (    | j                  |||      S r&   r   rb   s       r   !startswith_with_start_end_usecaser      s    <<5#&&r   c                 &    | j                  ||      S r&   r   r^   s      r    endswith_with_start_only_usecaser      s    ::ar   c                 (    | j                  |||      S r&   r   rb   s       r   endswith_with_start_end_usecaser      s    ::a$$r   c                 $    | j                  |      S r&   splitr+   s     r   split_usecaser      rA   r   c                 &    | j                  ||      S r&   r   r(   r,   maxsplits      r   split_with_maxsplit_usecaser          771hr   c                 (    | j                  ||      S N)r   r   r   s      r   !split_with_maxsplit_kwarg_usecaser      s    771x7((r   c                 "    | j                         S r&   r   r'   s    r   split_whitespace_usecaser          779r   c                 "    | j                         S r&   
splitlinesr   s    r   splitlines_usecaser      r   r   c                 $    | j                  |      S r&   r   r   keependss     r    splitlines_with_keepends_usecaser      s    <<!!r   c                 &    | j                  |      S )N)r   r   r   s     r   &splitlines_with_keepends_kwarg_usecaser      s    <<<**r   c                 $    | j                  |      S r&   rsplitrU   s     r   rsplit_usecaser      s    88C=r   c                 &    | j                  ||      S r&   r   r   rV   r   s      r   rsplit_with_maxsplit_usecaser      s    88C""r   c                 (    | j                  ||      S r   r   r   s      r   "rsplit_with_maxsplit_kwarg_usecaser      s    88C(8++r   c                 "    | j                         S r&   r   r   s    r   rsplit_whitespace_usecaser          88:r   c                 "    | j                         S r&   lstripr'   s    r   lstrip_usecaser      r   r   c                 $    | j                  |      S r&   r   r(   charss     r   lstrip_usecase_charsr          88E?r   c                 "    | j                         S r&   rstripr'   s    r   rstrip_usecaser      r   r   c                 $    | j                  |      S r&   r   r   s     r   rstrip_usecase_charsr      r   r   c                 "    | j                         S r&   stripr'   s    r   strip_usecaser     r   r   c                 $    | j                  |      S r&   r   r   s     r   strip_usecase_charsr     s    775>r   c                 $    | j                  |      S r&   )joinr+   s     r   join_usecaser   
  r\   r   c                 J    dg}|j                          | j                  |      S )N )popr   )r(   ls     r   join_empty_usecaser     s     	AEEG66!9r   c                 $    | j                  |      S r&   centerr+   s     r   center_usecaser     r   r   c                 &    | j                  ||      S r&   r   r(   r,   fillchars      r   center_usecase_fillcharr     s    88Ax  r   c                 $    | j                  |      S r&   ljustr+   s     r   ljust_usecaser     rA   r   c                 &    | j                  ||      S r&   r   r   s      r   ljust_usecase_fillcharr   !  r   r   c                 $    | j                  |      S r&   rjustr+   s     r   rjust_usecaser   %  rA   r   c                 &    | j                  ||      S r&   r   r   s      r   rjust_usecase_fillcharr  )  r   r   c                 "    | j                         S r&   )istitler'   s    r   istitle_usecaser  -      99;r   c                 :    g }| D ]  }|j                  |        |S r&   append)r(   r   r9   s      r   iter_usecaser
  1  s&    
A 	Hr   c                 "    | j                         S r&   )titler'   s    r   r  r  8  r   r   c                  :    g } dD ]  }| j                  |        | S r!   r  )r   r9   s     r   literal_iter_usecaser  <  s&    
A- 	Hr   c                 L    d}d}t        |       D ]  \  }}||z  }|dz  } ||fS )Nr   r      )	enumerate)r(   bufscanr9   r   s        r   enumerated_iter_usecaser  C  sA    
CD! 1q	 9r   c                 l    t        |       }t        |       }t        |dz         D ]  }t        |        y )Nr  )r1   iterrangenext)r(   nr9   _s       r   iter_stopiteration_usecaser  L  s2    AAQA1q5\ Qr   c                  p    d} t        |       }t        |       }t        |dz         D ]  }t        |        y )Nr"   r  )r  r1   r  r  )r   r9   r  r  s       r   "literal_iter_stopiteration_usecaser  S  s7    (AQAAA1q5\ Qr   c                 "    | j                         S r&   )islowerr'   s    r   islower_usecaser   [  r  r   c                 "    | j                         S r&   )lowerr'   s    r   lower_usecaser#  _  r   r   c                     t        |       S r&   r   r'   s    r   ord_usecaser%  c  r3   r   c                     t        |       S r&   )chrr'   s    r   chr_usecaser(  g  r3   r   c                        e Zd Z fdZ xZS )BaseTestc                 *    t         t        |           y r&   )superr*  setUp)self	__class__s    r   r-  zBaseTest.setUpl  s    h#%r   )__name__
__module____qualname__r-  __classcell__)r/  s   @r   r*  r*  k  s    & &r   r*  )r   ascii12345
1234567890   ¡Y tú quién te crees?   🐍⚡r"   )r   aaar9  baababascascihr4  asciju   大处着眼，小处着手r"   u%   大处着眼，小处着手。🐍⚡) r   r   )r   r4  )r4  r   )zasc ii )r4  ci)r4  r4  )r4     Ă)r4     大处)r4     étú?)r   +   大处 着眼，小处着手。大大大处)rF  r   )rF  rA  )rF  rB  )rF  u   大处大处)rF  rF  )rF  rC  rF  rD  )rF  rE  )r      tú quién te crees?)rH  r   )rH  rA  )rH  rB  )rH  rH  )rH  rC  )rH  rD  )rH  rE  )ababababa)rI  r<  )rI  aba)
aaaaaaaaaar9  )rL     aĂ)aabbaaaabbaaaac                   0   e Zd Zd ZefdZefdZd Zd ZefdZ	efdZ
efdZefd	Zefd
Zef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efdZd Zd Zef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- Z0d. Z1d/ Z2d0 Z3d1 Z4d2 Z5d3 Z6d4 Z7d5 Z8d6 Z9d7 Z:d8 Z;d9 Z<d: Z=d; Z>d< Z?d= Z@d> ZAefd?ZBefd@ZCdA ZDdB ZEdC ZFdD ZGdE ZHdF ZIdG ZJdH ZKdI ZLdJ ZMdK ZNdL ZOdM ZPdN ZQdO ZRdP ZSdQ ZTdR ZUdS ZVdT ZWdU ZXefdVZYdW ZZdX Z[dY Z\dZ Z]d[ Z^efd\Z_efd]Z`efd^Zaefd_Zbefd`Zcda Zddb Zedc Zfdd Zgde Zhdf Zidg Zjdh Zkdi Zldj Zmdk Zndl Zodm Zpdn Zqdo Zrdp Zsdq Ztdr Zuds Zvdt Zwdu Zxdv Zydw Zzdx Z{dy Z|dz Z}y{)|TestUnicodec                 f    t         }t        t               }| j                   |        |              y r&   )r$   r   assertPreciseEqualr.  pyfunccfuncs      r   test_literalzTestUnicode.test_literal  s%     _%%'2r   c                 x    t         }t        |      }t        D ]   }| j                   ||       ||             " y r&   )r)   r   UNICODE_EXAMPLESassertEqualr.  flagsrU  rV  r   s        r   test_passthroughzTestUnicode.test_passthrough  s7    $V! 	2AVAYa1	2r   c           	      H   t         }t        |      }t        D ]  }t        t              D ]t  }| j	                   |||       |||      |d|       | j	                   ||d       ||d      |dd       | j	                   |d|       |d|      dd|       v  y )Nz, r  )r-   r   rY  reversedrZ  r.  r\  rU  rV  rJ  r:  s         r   test_eqzTestUnicode.test_eq  s    V! 	AA./ A  1!&q!!Q.?A   1!&q!!Q.?A  1!&q!!Q.?AA	Ar   c                     t         d        }t        d D ].  \  }}| j                   |||      |j                  ||             0 y )Nc                 8    | dkD  rd}nd }|dk  rd}nd }||k(  ryy)Nr   concrete
      r#   )pred1pred2	resolved1	resolved2s       r   fooz)TestUnicode.test_eq_optional.<locals>.foo  s4    qy&	 	qy&	 	 I%r   )r  rl  )r   r   rZ  py_func)r.  rk  p1p2s       r   test_eq_optionalzTestUnicode.test_eq_optional  sO    		 
	   0 	?HRSR[#++b"*=>	?r   c                    |}t        |      }t        D ]6  }| j                   |||       |||      |j                  d|d|d       8 t	        t        d      D ]m  \  }}| j                   |||       |||      |j                  d|d|d       | j                   |||       |||      |j                  d|d|d       o y )Nz: "z", ""   r)r   UNICODE_ORDERING_EXAMPLESrZ  r0  r   )r.  usecaserU  rV  rJ  r:  s         r   _check_ordering_opzTestUnicode._check_ordering_op  s    V + 	Aq!a$+$4$4a;	 !!:a@ 	DAqq!a$+$4$4a; q!a$+$4$4a;	r   c                 .    | j                  t               y r&   )ry  rL   r.  r\  s     r   test_ltzTestUnicode.test_lt      
+r   c                 .    | j                  t               y r&   )ry  rN   r{  s     r   test_lezTestUnicode.test_le  r}  r   c                 .    | j                  t               y r&   )ry  rP   r{  s     r   test_gtzTestUnicode.test_gt  r}  r   c                 .    | j                  t               y r&   )ry  rR   r{  s     r   test_gezTestUnicode.test_ge  r}  r   c                 x    t         }t        |      }t        D ]   }| j                   ||       ||             " y r&   )r2   r   rY  rZ  r[  s        r   test_lenzTestUnicode.test_len  s7    V! 	2AVAYa1	2r   c                 x    t         }t        |      }t        D ]   }| j                   ||       ||             " y r&   )r6   r   rY  rZ  r[  s        r   	test_boolzTestUnicode.test_bool  s7    V! 	2AVAYa1	2r   c                     t         }t        |      }g d}d}|D ]1  }| j                   ||       ||      |j                  |             3 y )N	r   	zt	t	za	u   	⚡z	a	bc
ab	cu   🐍	⚡u   🐍⚡
		🐍	zabab			ab
	az*Results of "{}".expandtabs() must be equalmsg)r   r   rZ  formatr.  rU  rV  casesr  r   s         r   test_expandtabszTestUnicode.test_expandtabs  sU    #VN ; 	EAVAYacjjmD	Er   c                    t        t              t        t              g}ddg}g d}|D ]b  }t        dd      D ]Q  }t	        ||      D ]@  \  }}| j                  |j                  ||       |||      |j                  ||             B S d y )Nz,Results of "{}".expandtabs({}) must be equalz4Results of "{}".expandtabs(tabsize={}) must be equalr  rm  re  r  )r   r   r   r  ziprZ  rn  r  )r.  fnsmessagesr  r   r   fnr  s           r   test_expandtabs_with_tabsizez(TestUnicode.test_expandtabs_with_tabsize  s    349:<BJLN  	AA R= A"31 AGB$$RZZ7%;R7^),Aw)? % AAA	Ar   c                 $   t         }t        |      }t        j                  t        f}| j                  t              5 } |dd       d d d        dj                  |      }| j                  |t        j                               y # 1 sw Y   @xY w)Nr  333333@z"tabsize" must be {}, not float)r   r   r   IntegerintassertRaisesr   r  assertInstr	exception)r.  rU  rV  accepted_typesraisesr  s         r   ,test_expandtabs_exception_noninteger_tabsizez8TestUnicode.test_expandtabs_exception_noninteger_tabsize+  sv    0V---{+ 	v$	/66~Fc3v//01	 	s   
BBc           	          t         }t        |      }g d}g d}ddg}|t        z   D ]@  }dd|d d |dd  |||z   g}||z   |z   D ]"  }| j                   |||       |||             $ B y )	Nhello
helloworldr   
her  r  ellor   lowolor  r  ohellohellohellorA  r   r(      r   r   rY  rZ  )	r.  rU  rV  cpython_strcpython_subs
extra_subsr   default_subsprefixs	            r   test_startswith_defaultz#TestUnicode.test_startswith_default5  s    #V1
 (-
// 	FAQsVQqrUAq1u=L&5
B F  6!2E!V4DEF	Fr   c                    t         }t        |      }g d}g d}ddg}|t        z   D ]`  }dd|d d |dd  |||z   g}||z   |z   D ]B  }t        t	        d	d
            d gz   D ]$  }	| j                   ||||	       ||||	             & D b y Nr  r  r  rA  r   r(   r  r  rf  )r   r   rY  listr  rZ  )
r.  rU  rV  r  r  r  r   r  r  r_   s
             r   test_startswith_with_startz&TestUnicode.test_startswith_with_startD  s    3V1
 (-
// 	>AQsVQqrUAq1u=L&5
B >!%R.1TF: >E$$VAvu%=%*1fe%<>>>	>r   c                 V   t         }t        |      }g d}g d}ddg}|t        z   D ]  }dd|d d |dd  |||z   g}||z   |z   D ]b  }t        t	        d	d
            d gz   D ]D  }	t        t	        d	d
            d gz   D ]&  }
| j                   ||||	|
       ||||	|
             ( F d  y r  r   r   rY  r  r  rZ  )r.  rU  rV  r  r  r  r   r  r  r_   rc   s              r   test_startswith_with_start_endz*TestUnicode.test_startswith_with_start_endU  s    2V1
 (-
// 	GAQsVQqrUAq1u=L&5
B G!%R.1TF: GE#E#rN3tf< G((65#)F).q&%)EGGGG	Gr   c                    d}| j                  t        |      5  t        t              } |dd       d d d        d}| j                  t        |      5  t        t              } |ddd       d d d        d}| j                  t        |      5  t        t
              } |dddd	       d d d        y # 1 sw Y   xY w# 1 sw Y   QxY w# 1 sw Y   y xY w)
Nz9The arg 'prefix' should be a string or a tuple of stringsr  )r  r  z:When specified, the arg 'start' must be an Integer or Noner  zinvalid startz8When specified, the arg 'end' must be an Integer or Noner   zinvalid end)assertRaisesRegexr   r   r   r   r   )r.  msg_invalid_prefixrV  msg_invalid_startmsg_invalid_ends        r   &test_startswith_exception_invalid_argsz2TestUnicode.test_startswith_exception_invalid_argsg  s    G 	##K1CD 	&+,E'9%	&
 I 	##K1BC 	2;<E'41	2
 G 	##KA 	3:;E'4M2	3 	3	& 	&	2 	2	3 	3s#   B0B<C0B9<CCc           	          t         }t        |      }g d}g d}ddg}|t        z   D ]D  }dd|d d |dd  |||z   g}||z   |z   D ]&  }|d	f}	| j                   |||	       |||	             ( F y )
Nr  r  r  rA  r   r(   r  r  r  r  )
r.  rU  rV  r  r  r  r   r  sub_strr  s
             r   test_startswith_tuplez!TestUnicode.test_startswith_tuplez  s    #V1
 (-
// 	3AQsVQqrUAq1u=L',6C 3!4  6!2!&q&!133	3r   c                 ^   t         }t        |      }g d}g d}ddg}|t        z   D ]  }dd|d d |dd  |||z   g}||z   |z   D ]f  }t        t	        d	d
            d gz   D ]H  }	t        t	        d	d
            d gz   D ]*  }
|df}| j                   ||||	|
       ||||	|
             , J h  y )Nr  r  r  rA  r   r(   r  r  r  rf  r  r  )r.  rU  rV  r  r  r  r   r  r  r_   rc   r  s               r   test_startswith_tuple_argsz&TestUnicode.test_startswith_tuple_args  s    2V1
 (-
// 	GAQsVQqrUAq1u=L',6C G!%R.1TF: GE#E#rN3tf< G")4((65#)F).q&%)EGGGG	Gr   c           
          t         }t        |      }g d}g d}ddg}|t        z   D ]T  }dd|d d |dd  |||z   g}||z   |z   D ]6  }d	}	| j                   |||       |||      |	j	                  ||      
       8 V y )Nr  r  r  rA  r   r(   r  r  z)Results "{}".endswith("{}") must be equalr  r   r   rY  rZ  r  )
r.  rU  rV  r  r  r  r   r  r  r  s
             r   test_endswith_defaultz!TestUnicode.test_endswith_default  s    !V 2
 (-
// 	=AQsVQqrUAq1u=L',6C =A  7!3U1g5F%(ZZ7%; ! ==	=r   c                 @   t         }t        |      }g d}g d}ddg}|t        z   D ]u  }dd|d d |dd  |||z   g}||z   |z   D ]W  }t        t	        d	d
            d gz   D ]9  }	d}
| j                   ||||	       ||||	      |
j                  |||	             ; Y w y )Nr  r  r  rA  r   r(   r  r  r  rf  z-Results "{}".endswith("{}", {}) must be equalr  )r   r   rY  r  r  rZ  r  )r.  rU  rV  r  r  r  r   r  r  r_   r  s              r   test_endswith_with_startz$TestUnicode.test_endswith_with_start  s    1V 2
 (-
// 	HAQsVQqrUAq1u=L',6C H!%R.1TF: HEIC$$VAw%>%*1gu%=),Aw)F % HHH	Hr   c                    t         }t        |      }g d}g d}ddg}|t        z   D ]  }dd|d d |dd  |||z   g}||z   |z   D ]x  }t        t	        d	d
            d gz   D ]Z  }	t        t	        d	d
            d gz   D ]<  }
d}| j                   ||||	|
       ||||	|
      |j                  |||	|
             > \ z  y )Nr  r  r  rA  r   r(   r  r  r  rf  OResults "{}".endswith("{}", {}, {})                               must be equalr  r   r   rY  r  r  rZ  r  )r.  rU  rV  r  r  r  r   r  r  r_   rc   r  s               r   test_endswith_with_start_endz(TestUnicode.test_endswith_with_start_end  s   0V 2
 (-
// 		QAQsVQqrUAq1u=L',6C Q!%R.1TF: QE#E#rN3tf< Q.((7E3)G).q'5#)F-0ZZ7E3-O ) QQQQ		Qr   c           
         t         }t        |      }g d}g d}ddg}|t        z   D ]X  }dd|d d |dd  |||z   g}||z   |z   D ]:  }d	}	|d
f}
| j                   |||
       |||
      |	j	                  ||
             < Z y )Nr  r  r  rA  r   r(   r  r  z'Results "{}".endswith({}) must be equalr  r  r  )r.  rU  rV  r  r  r  r   r  r  r  
tuple_subss              r   test_endswith_tuplezTestUnicode.test_endswith_tuple  s    !V 2
 (-
// 	@AQsVQqrUAq1u=L',6C @?%t_
  :!6!&q*!5%(ZZ:%> ! @@	@r   c                    t         }t        |      }g d}g d}ddg}|t        z   D ]  }dd|d d |dd  |||z   g}||z   |z   D ]|  }t        t	        d	d
            d gz   D ]^  }	t        t	        d	d
            d gz   D ]@  }
d}|df}| j                   ||||	|
       ||||	|
      |j                  |||	|
             B ` ~  y )Nr  r  r  rA  r   r(   r  r  r  rf  r  r  r  r  )r.  rU  rV  r  r  r  r   r  r  r_   rc   r  r  s                r   test_endswith_tuple_argsz$TestUnicode.test_endswith_tuple_args  s   0V 2
 (-
// 	EAQsVQqrUAq1u=L',6C 	E!%R.1TF: EE#E#rN3tf< E.&-t_
((:uc)J).q*eS)I-0ZZ:8=s.D ) E	EE	E	Er   c                     t         }t        |      }t        D ]I  }dd|d d d   |d d |dd  |||z   g}|D ]*  }| j                   |||       |||      d|d|d       , K y )	Nr   xxrm  r  r  'z' in ''?)rJ   r   rY  rZ  )r.  r\  rU  rV  rJ  extrassubstrs          r   test_inzTestUnicode.test_in  s    V! 	@A$$B$3B121q5AF  @  !2!&vq!14:A!>@@	@r   c                    | j                          t        }t        |      }||fD ]N  }| j                  t              5 } |dd       d d d        | j                  dt        j                               P t        j                  t        j                  f}| j                  t              5 } |dd        d d d        dj                  |      }| j                  |t        j                               y # 1 sw Y   xY w# 1 sw Y   LxY wNrJ  r   empty separatorz"sep" must be {}, not none)disable_leak_checkrW   r   r  
ValueErrorr  r  r  r   UnicodeTypeUnicodeCharSeqr   r  r.  rU  rV  funcr  r  r  s          r   $test_partition_exception_invalid_sepz0TestUnicode.test_partition_exception_invalid_sep  s    !"V UO 	DD"":. &S"MM+S1A1A-BC	D
  ++U-A-AB{+ 	v#t	*11.Ac3v//01 
	 	   
C5,
D5C>	D
c           	          t         }t        |      }g d}d}|D ]7  \  }}| j                   |||       |||      |j                  ||             9 y )N	r      ⚡abcabcr  r8  r     🐍⚡🐍r  abababarJ  r  r:  r  r   r  r<  r  rK  z-Results of "{}".partition("{}") must be equalr  )rW   r   rZ  r  r.  rU  rV  CASESr  r   rV   s          r   test_partitionzTestUnicode.test_partition'  sb    "V

 > 	5FAsVAs^U1c]!$As!3  5	5r   c                 \   t         }t        |      }t        D cg c]  }|dd|d d |dd  |gf }}dg dfdg dfd	d
gfdd
gfddgfdg dfdddgfddgfddgfddgfg
}||z   D ]@  \  }}|D ]6  }d}	| j                   |||       |||      |	j	                  ||             8 B y c c}w )Nr   r  r  r  uf   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaĂrC  u   ȁu   Ġu   Ƞuh   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa􀌄   􀌄u   􀈄u   􂀄   ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂarJ    􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄a  􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄ĂrC  daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)rC  r  rM  u   a􀌄   ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂr  u   Ă􀌄   ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂa_a_  􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄a_  􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄Ă_   Ă_z%Results "{}".find("{}") must be equalr  )r[   r   rY  rZ  r  )
r.  r\  rU  rV  r   r  r  subsr  r  s
             r   	test_findzTestUnicode.test_find;  s!   V 8H
23QT1Sb61QR5!,-
 
 "#KL% (6 7!C5)%u-*XJ7JKl,>?@"TF+&/+i[9
 $l2 	=GAt ==  7!3U1g5F%(ZZ7%; ! ==	=%
s   B)c                 
   t         }t        |      }t        D ]i  }dd|d d |dd  |fD ]W  }t        t	        dd            d gz   D ]9  }d}| j                   ||||       ||||      |j                  |||             ; Y k y )	Nr   r  r  r  r  rf  z)Results "{}".find("{}", {}) must be equalr  )r`   r   rY  r  r  rZ  r  r.  rU  rV  r   r  r_   r  s          r   test_find_with_start_onlyz%TestUnicode.test_find_with_start_onlyW  s    -V! 	HAafaeQ7 H!%R.1TF: HEEC$$VAw%>%*1gu%=),Aw)F % HHH	Hr   c                 2   t         }t        |      }t        t        dd            d gz   x}}t        D ]b  }dd|d d |dd  |fD ]P  }t        ||      D ]?  \  }}d}	| j                   |||||       |||||      |	j                  ||||             A R d y )	Nr  rf  r   r  r  r  z0Results of "{}".find("{}", {}, {}) must be equalr  )rd   r   r  r  rY  r   rZ  r  
r.  rU  rV  startsendsr   r  r_   rc   r  s
             r   test_find_with_start_endz$TestUnicode.test_find_with_start_endc  s    ,VU3^,v55! 	MAafaeQ7 M")&$"7 MJE3LC$$VAws%C%*1guc%B),Aws)K % MMM	Mr   c                 T   t         }t        |      }t        j                  t        j                  f}dD ]f  \  }}}| j                  t              5 } |dd||       d d d        dj                  ||      }| j                  |t        j                               h y # 1 sw Y   CxY wN))皙?   r_   )r         ?rc   r4  sciz"{}" must be {}, not float)rd   r   r   r  NoneTyper  r   r  r  r  r  )	r.  rU  rV  acceptedr_   rc   namer  r  s	            r   (test_find_exception_noninteger_start_endz4TestUnicode.test_find_exception_noninteger_start_endp  s    ,VMM5>>2 D 	6E3"";/ 26gueS12.55dHECMM#s6#3#345		62 2s   BB'	c                    | j                          t        }t        |      }||fD ]N  }| j                  t              5 } |dd       d d d        | j                  dt        j                               P t        j                  t        j                  f}| j                  t              5 } |dd        d d d        dj                  |      }| j                  |t        j                               y # 1 sw Y   xY w# 1 sw Y   LxY wr  )r  rg   r   r  r  r  r  r  r   r  r  r   r  r  s          r   %test_rpartition_exception_invalid_sepz1TestUnicode.test_rpartition_exception_invalid_sep{  s    !#V UO 	DD"":. &S"MM+S1A1A-BC	D
  ++U-A-AB{+ 	v#t	*11.Ac3v//01 
	 	r  c           	          t         }t        |      }g d}d}|D ]7  \  }}| j                   |||       |||      |j                  ||             9 y )Nr  z.Results of "{}".rpartition("{}") must be equalr  )rg   r   rZ  r  r  s          r   test_rpartitionzTestUnicode.test_rpartition  sb    #V

 ? 	5FAsVAs^U1c]!$As!3  5	5r   c                     t         }t        |      }d}t        D ]<  \  }} |||      } |||      }| j                  |||j	                  ||||             > y )Nz6'{0}'.py_count('{1}') = {2}
'{0}'.c_count('{1}') = {3})rk   r   UNICODE_COUNT_EXAMPLESrZ  r  )r.  rU  rV  	error_msgr   sub	py_resultc_results           r   
test_countzTestUnicode.test_count  sg    VM	, 	LFAsq#IQ}HY&--aiJL	Lr   c                 V   t         }t        |      }ddz  }t        D ]  \  }}t        dd      D ]<  } ||||      } ||||      }| j	                  |||j                  |||||             >  |||d       } |||d       }| j	                  |||j                  ||d ||              y )N%s
%s)z '{0}'.py_count('{1}', {2}) = {3}z'{0}'.c_count('{1}', {2}) = {4}   )rm   r   r"  r  rZ  r  )	r.  rU  rV  r#  r   r$  r9   r%  r&  s	            r   test_count_with_startz!TestUnicode.test_count_with_start  s    )V  C C	 - 	9FAs3^ ="1c1-	 C+  H!*!1!1!S!Y2:"<== q#t,IQT*HY&--adI.689	9r   c                    t         }t        |      }ddz  }t        D ]  \  }}t        t	        dd      d      D ]B  \  }} |||||      } |||||      }	| j                  ||	|j                  ||||||	             D t	        dd      D ]?  } |||d |      } |||d |      }	| j                  ||	|j                  ||d |||	             A  |||d d       } |||d d       }	| j                  ||	|j                  ||d d ||	              y )Nr)  )%'{0}'.py_count('{1}', {2}, {3}) = {4}z$'{0}'.c_count('{1}', {2}, {3}) = {5}r*  r+  )r*  r+  )rp   r   r"  r   r  rZ  r  )
r.  rU  rV  r#  r   r$  r9   jr%  r&  s
             r   test_count_with_start_endz%TestUnicode.test_count_with_start_end  sV   -V  H H	 - 	9FAsc2	: =1"1c1a0	 CA.  H!*!1!1!S!Q	2:"<== 3^ ="1c43	 Cq1  H!*!1!1!S$92:"<== q#tT2IQT40HY&--adD).689#	9r   c                 >   t        t              }| j                  t              5 } |dddd       d d d        | j	                  dt        j                               | j                  t              5 } |dddd       d d d        | j	                  dt        |j                               | j                  t              5 } |dddd       d d d        | j	                  d	t        |j                               y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   GxY w)
Nr4  r   r  r  ,The slice indices must be an Integer or Noneg333333?      z(The substring must be a UnicodeType, not)r   rp   r  r   r  r  r  r.  rV  r  s      r   test_count_arg_type_checkz%TestUnicode.test_count_arg_type_check  s   12{+ 	(v'33'	(D&**+	- {+ 	(v'3Q'	(D&**+	- {+ 	%v'2q!$	%@&**+	-	( 	(
	( 	(
	% 	%s#   C;3DD;DDDc                 d   t         fd}| j                  t              5 } |dddd       d d d        | j                  dt	        j
                               ddz  }t        j                  t        j                  t        j                  t        j                  t        j                        t        j                  t        j                              } t        |g            } dddd	      } |dddd	      }| j                  |||j                  dddd	||             y # 1 sw Y   xY w)
Nc                     t        j                  t         j                  t         j                  t        j                  t         j                        t        j                  t         j                              } t        |g             y r&   )r   int64unicode_typeOptionalfloat64r   )argsbad_sigrU  s     r   try_compile_bad_optionalzPTestUnicode.test_count_optional_arg_type_check.<locals>.try_compile_bad_optional  sU    kk%"4"4"'"4"4"'.."?"'.."?AG D'OF#r   	   tú quis?u   tú皙?r2  r)  )r.  z''{0}'.c_count_op('{1}', {2}, {3}) = {5}r      )rp   r  r   r  r  r  r   r9  r:  r;  r   rZ  r  )	r.  r?  r  r#  sig_optionalcfunc_optionalr%  r&  rU  s	           @r   "test_count_optional_arg_type_checkz.TestUnicode.test_count_optional_arg_type_check  s   -	$ {+ 	Cv$[%cB	CD&**+	-   K K	{{5#5#5#(#5#5#(>>%++#>#(>>%++#>@ .|n-f5;q!4	!+ua;H"))+uaI*24	5	C 	Cs   D&&D/c                 f   t         }t        |      }t        D cg c]  }|dd|d d |dd  |gf }}dg dfdg dfd	d
dgfddgfddgfddgfdg dfdddgfddgfddgfddgfg}||z   D ]@  \  }}|D ]6  }d}| j                   |||       |||      |j	                  ||             8 B y c c}w )Nr   r  r  r  uf   Ăaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar  uh   􀌄aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar  abcdefghiabcabc   aĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂrJ    a􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄  Ă􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄rC  r  )rC  r  u   Ăau   􀌄ar  r  u   􀌄Ă   _aĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ_a  _a􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄  _Ă􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄   _Ăz&Results "{}".rfind("{}") must be equalr  )ru   r   rY  rZ  r  	r.  rU  rV  r   r  r  r	  r  r  s	            r   
test_rfindzTestUnicode.test_rfind
  s-   V 8H
23QT1Sb61QR5!,-
 
 "#KL% (6 7eR[)!C5)%u-*XJ7JKl,>?@"TF+&/+i[9
 $l2 	=GAt =>  7!3U1g5F%(ZZ7%; ! ==	='
s   B.c                 
   t         }t        |      }t        D ]i  }dd|d d |dd  |fD ]W  }t        t	        dd            d gz   D ]9  }d}| j                   ||||       ||||      |j                  |||             ; Y k y )	Nr   r  r  r  r  rf  z*Results "{}".rfind("{}", {}) must be equalr  )rw   r   rY  r  r  rZ  r  r  s          r   test_rfind_with_start_onlyz&TestUnicode.test_rfind_with_start_only'  s    .V! 	HAafaeQ7 H!%R.1TF: HEFC$$VAw%>%*1gu%=),Aw)F % HHH	Hr   c                 `   t         }t        |      }t        t        dd            d gz   }t        t        dd            d gz   }t        D ]b  }dd|d d |dd  |fD ]P  }t        ||      D ]?  \  }}d}	| j                   |||||       |||||      |	j                  ||||             A R d y )	Nr  rf  r   r  r  r  z1Results of "{}".rfind("{}", {}, {}) must be equalr  )ry   r   r  r  rY  r   rZ  r  r  s
             r   test_rfind_with_start_endz%TestUnicode.test_rfind_with_start_end3  s    -VeCn%.E#rN#tf,! 	MAafaeQ7 M")&$"7 MJE3MC$$VAws%C%*1guc%B),Aws)K % MMM	Mr   c                 4   t        t              }t        D ]t  }dD ]m  }| j                  t              5 } |||       d d d        dj                  t        j                        }| j                  |t        j                               o v y # 1 sw Y   RxY w)N)Nr  F
must be {})r   ru   rY  r  r   r  r   r  r  r  r  )r.  rV  r   r  r  r  s         r   test_rfind_wrong_substrz#TestUnicode.test_rfind_wrong_substrA  s    ]#! 	:A+ :&&{3 &v!W%&"))%*;*;<c3v'7'7#89	:	:& &s   
BBc           
         t        t              }t        j                  t        j                  f}t
        D ]  }dd|d d |dd  |fD ]  }t        ddgddg      D ]d  \  }}| j                  t              5 } |||||       d d d        d	j                  |      }| j                  |t        j                               f t        ddgd
dg      D ]d  \  }}| j                  t              5 } |||||       d d d        dj                  |      }| j                  |t        j                               f   y # 1 sw Y   xY w# 1 sw Y   SxY w)Nr   r  r  r  r  Frm  r  z"start" must be {}gTz"end" must be {})r   ry   r   r  r  rY  r   r  r   r  r  r  r  )	r.  rV  r  r   r  r_   rc   r  r  s	            r   test_rfind_wrong_start_endz&TestUnicode.test_rfind_wrong_start_endK  sR   12--8! 	>AafaeQ7 >")3,Q"@ >JE3**;7 66a%56.55nECMM#s6+;+;'<=	> #*2q'D$<"@ >JE3**;7 66a%56,33NCCMM#s6+;+;'<=	>>	>6 66 6s   5D>	,E
	>E
Ec                    t         d   }|dd }t        j                  t        j                  f}dj	                  |      }d }| j                  t              5 } |||dd       d d d        | j                  |t        j                               d }| j                  t              5 } |||dd       d d d        | j                  |t        |j                               y # 1 sw Y   xY w# 1 sw Y   ;xY w)Nr   r  rm  rX  c                     t        j                  t         j                  t         j                  t        j                  t         j                        t        j                  t         j
                              } t        |g      t               y r&   )r   r9  r:  r;  r<  intpr   ry   r=  wrong_sig_optionals     r    try_compile_wrong_start_optionalzYTestUnicode.test_rfind_wrong_start_end_optional.<locals>.try_compile_wrong_start_optionale  sY    !&U-?-?-2-?-?-2^^EMM-J-2^^EJJ-G"I 'D$%&'CDr   r  c                     t        j                  t         j                  t         j                  t        j                  t         j                        t        j                  t         j
                              } t        |g      t               y r&   )r   r9  r:  r;  r^  r<  r   ry   r_  s     r   try_compile_wrong_end_optionalzWTestUnicode.test_rfind_wrong_start_end_optional.<locals>.try_compile_wrong_end_optionalp  sY    !&U-?-?-2-?-?-2^^EJJ-G-2^^EMM-J"L 'D$%&'CDr   )
rY  r   r  r  r  r  r   r  r  r  )r.  r   r  r  r  ra  r  rc  s           r   #test_rfind_wrong_start_end_optionalz/TestUnicode.test_rfind_wrong_start_end_optional_  s    QAb'--8!!.1	E {+ 	Av,Qa@	Ac3v//01	E {+ 	?v*1gq#>	?c3v//01	A 	A	? 	?s   C#)C/#C,/C8c           
      <   t         }t        |      }t        D cg c]  }|d|d d |dd  |gf }}dg dfddgfddgfd	d
gfddgfddgfddgfg}||z   D ]@  \  }}|D ]6  }d}| j                   |||       |||      |j	                  ||             8 B y c c}w )Nr   r  r  rG  r   defrH  rI  rJ  rJ  rK  rC  rL  rM  rN  rO  rP  z'Results "{}".rindex("{}") must be equalr  )r   r   rY  rZ  r  rQ  s	            r   test_rindexzTestUnicode.test_rindex{  s    V 2B
,-QQsVQqrUA&'
 
 /0!C5)%u-*XJ7"TF+&/+i[9
 $l2 	=GAt =?  7!3U1g5F%(ZZ7%; ! ==	=
   Bc           
      <   t         }t        |      }t        D cg c]  }|d|d d |dd  |gf }}dg dfddgfddgfd	d
gfddgfddgfddgfg}||z   D ]@  \  }}|D ]6  }d}| j                   |||       |||      |j	                  ||             8 B y c c}w )Nr   r  r  rG  rf  r  rJ  r   r  rC  r  r  r  r  r  z&Results "{}".index("{}") must be equalr  )r   r   rY  rZ  r  rQ  s	            r   
test_indexzTestUnicode.test_index  s    V 2B
,-QQsVQqrUA&'
 
 /0!C5)%u-*XJ7"TF+&/+i[9
 $l2 	=GAt =>  7!3U1g5F%(ZZ7%; ! ==	=
ri  c                 4   t         t        g}ddg}g d}t        ||      D ]  \  }}t        |      }|D ]  }t	        |      }dt        t        d|dz               f|d d dgt        t        dd|z
              z   f|d	d  t        t        d
            t        t        dd
|z
              z   f|dgt        t        dd|z
              z   fg}	|	D ]E  \  }
}|d gz   D ]7  }| j                   |||
|       |||
|      |j                  ||
|             9 G   y )Nz*Results "{}".index("{}", {}) must be equalz+Results "{}".rindex("{}", {}) must be equalr4  r5  r6  r7  r"   r   r  r  r   r     r  )	r   r   r  r   r1   r  r  rZ  r  )r.  pyfuncsr  unicode_examplesrU  r  rV  r   r   r  r  r  r_   s                r   !test_index_rindex_with_start_onlyz-TestUnicode.test_index_rindex_with_start_only  s]   013@AC
 w1 	LKFCLE% LFeCQ/01sVaS4c1q5(9#::;qrUDqNT%QU2C-DDEd5a!e#4556	 (- LOGV!'4& L((7E)B).q'5)A-0ZZ7E-J ) LLLL	Lr   c                    t         t        g}ddg}g d}t        ||      D ]^  \  }}t        |      }|D ]G  }t	        |      }dt        t        d|dz               t        t        |d            f|d d d	gt        t        dd|z
              z   dd
gt        t        |dz
  d            z   f|dd  t        t        d            t        t        dd
            z   t        t        |d            f|d	gt        t        dd|z
              z   t        t        |d            fg}	|	D ]V  \  }
}}t        |d gz   |      D ]=  \  }}| j                   |||
||       |||
||      |j                  ||
||             ? X J a y )Nz1Results of "{}".index("{}", {}, {}) must be equalz2Results of "{}".rindex("{}", {}, {}) must be equalrm  r   rn  r  re  r  r   rm  rt  r  ro  r  )
r   r   r  r   r1   r  r  r   rZ  r  )r.  rp  r  rq  rU  r  rV  r   r   r  r  r  r  r_   rc   s                  r    test_index_rindex_with_start_endz,TestUnicode.test_index_rindex_with_start_end  s   /1NOGHJ
 w1 	QKFCLE% QFeCQ/0$uQ|2DEsVaS4c1q5(9#::"XU1q5"%5 668qrUDqNT%R.-AA%2,')d5a!e#455tE!RL7IJ .3 Q)GVT&-fvot&D Q
s((7E3)G).q'5#)F-0ZZ7E3-O ) QQQQ	Qr   c                 p   | j                          g d}t        t        g}|D ]  }t        |      }|D ]  }t	        |      }dt        t        |dz   d            |gf|d d dgt        t        |dz
              f|dd  t        t        d	d            |gf|d gt        t        |            fg}|D ]s  \  }}	}
t        |	|
      D ]^  \  }}||fD ]R  }| j                  t              5 } |||||       d d d        d
}| j                  |t        j                               T ` u   y # 1 sw Y   <xY w)Nrm  r   r  re  r  r   rt  r  ro  zsubstring not found)r  r   r   r   r1   r  r  r   r  r  r  r  r  )r.  rq  rp  rU  rV  r   r   r  r  r  r  r_   rc   r  r  r  s                   r   /test_index_rindex_exception_substring_not_foundz;TestUnicode.test_index_rindex_exception_substring_not_found  sf   !
 01NO 	FFLE% FFeAE2./!5sVaS$uQU|"45qrUDq".4U1X/	 .3 F)GVT&-fd&; F
s%+UO FD!%!2!2:!> =& $Q <="7C MM#s63C3C/DE	FFFF	F= =s   %D,,D5c           	      n   t         j                  t         j                  f}t        t        g}|D ]x  }t        |      }dD ]f  \  }}}| j                  t              5 } |dd||       d d d        dj                  ||      }	| j                  |	t        j                               h z y # 1 sw Y   ExY wr  )r   r  r  r   r   r   r  r   r  r  r  r  )
r.  r  rp  rU  rV  r_   rc   r  r  r  s
             r   0test_index_rindex_exception_noninteger_start_endz<TestUnicode.test_index_rindex_exception_noninteger_start_end  s    MM5>>2/1NO 	:FLE$H : sD&&{3 6v'5%56299$Ic3v'7'7#89	:	:6 6s   B++B4c           	          t         }t        |      }t        D ]L  }t        t	        |       t	        |            D ](  }| j                   |||       |||      d||fz         * N y )N	'%s'[%d]?)r:   r   rY  r  r1   rZ  )r.  rU  rV  r   r9   s        r   test_getitemzTestUnicode.test_getitem  sj     V! 	7ACF7CF+ 7  1!&q!!,1v!577	7r   c           	          t         }t        |      }ddg}|D ]L  }t        t        |       t        |            D ](  }| j	                   |||       |||      d||fz         * N y )Nu   aሴu   ¡着rz  )r=   r   r  r1   rZ  )r.  rU  rV  samplesr   r9   s         r   test_getitem_scalar_kindz$TestUnicode.test_getitem_scalar_kind  sv     ,Vg& 	7ACF7CF+ 7  1!&q!!,1v!577	7r   c                    | j                          t        }t        |      }t        D ]  }| j	                  t
              5 } ||t        |             d d d        | j                  dt        j                               | j	                  t
              5 } ||t        |             d d d        | j                  dt        |j                                y # 1 sw Y   xY w# 1 sw Y   =xY w)Nzstring index out of range)
r  r:   r   rY  r  
IndexErrorr1   r  r  r  )r.  rU  rV  r   r  s        r   test_getitem_errorzTestUnicode.test_getitem_error#  s    ! V! 	NA"":. "&q#a&!"MM5s6;K;K7LM"":. !&aQ !MM5s6;K;K7LM	N" "! !s    CC$C!	$C-	c                 V   t         }t        |      }t        D ]  }t        t	        t        |       t        |                  D ]b  }t        t	        t        |       t        |                  D ]5  }t        ||      }| j                   |||       |||      d|||fz         7 d  y )N'%s'[%d:%d]?)r:   r   rY  r  r  r1   slicerZ  r.  rU  rV  r   r9   r/  sls          r   test_slice2zTestUnicode.test_slice22  s     V! 	AA%QQ01 AeSVGSV45 AAq!B$$VAr]%*1b\%3q!Qi%?AAA	Ar   c                 "   t         }t        |      }t        D ]u  }ddt        |      t        |      dz   fD ]U  }ddt        |      t        |      dz   fD ]5  }t	        ||      }| j                   |||       |||      d|||fz         7 W w y )Nr  rm  r  r  r:   r   rY  r1   r  rZ  r  s          r   test_slice2_errorzTestUnicode.test_slice2_error>  s     V! 	AA"c!fc!fqj1 Ab#a&#a&1*5 AAq!B$$VAr]%*1b\%3q!Qi%?AAA	Ar   c                 .   t         }t        |      }ddg}|D ]{  }dddddt        |      t        |      dz   fD ]X  }dddddt        |      t        |      dz   fD ]5  }t        ||      }| j	                   |||       |||      d|||fz         7 Z } y )	N	   abcሴሴu   ¡¡¡着着着r  rm  r   r  rt  r  )r=   r   r1   r  rZ  )r.  rU  rV  r}  r   r9   r/  r  s           r   test_getitem_slice2_kindz$TestUnicode.test_getitem_slice2_kindJ  s     ,V$&78 	AA"aAs1vs1vz: Ab!Q3q63q6A:> AAq!B$$VAr]%*1b\%3q!Qi%?AAA	Ar   c                 D   t         }t        |      }t        D ]  }t        t	        |       t	        |            D ]b  }t        t	        |       t	        |            D ]>  }dD ]7  }t        |||      }| j                   |||       |||      d||||fz         9 @ d  y )Nr  rm  r  rt  '%s'[%d:%d:%d]?)r:   r   rY  r  r1   r  rZ  r.  rU  rV  r   r9   r/  kr  s           r   test_slice3zTestUnicode.test_slice3X  s     V! 	KACF7CF+ KAwA/ KA+ K"1a^((2).q"):aAq\)IKKKK	Kr   c                 D   t         }t        |      }g d}|D ]  }t        t        |       t        |            D ]b  }t        t        |       t        |            D ]>  }dD ]7  }t	        |||      }| j                   |||       |||      d||||fz         9 @ d  y )N)r  u   aሴbሴc¡¡¡着着着u   ¡着¡着¡着u   着a着b着cu   ¡着a¡着b¡着cu   ¡着a着¡cr  r  )r=   r   r  r1   r  rZ  )	r.  rU  rV  r}  r   r9   r/  r  r  s	            r   test_getitem_slice3_kindz$TestUnicode.test_getitem_slice3_kinde  s     ,V$  	KACF7CF+ KAwA/ KA+ K"1a^((2).q"):aAq\)IKKKK	Kr   c                 4   t         }t        |      }t        D ]~  }ddt        |      t        |      dz   fD ]^  }ddt        |      t        |      dz   fD ]>  }dD ]7  }t	        |||      }| j                   |||       |||      d||||fz         9 @ `  y )Nr  rm  r  r  r  r  r  s           r   test_slice3_errorzTestUnicode.test_slice3_errorz  s     V! 	KA"c!fc!fqj1 Kb#a&#a&1*5 KA+ K"1a^((2).q"):aAq\)IKKKK	Kr   c                 P    t         d        }d}| j                   ||      d       y)z
        Make sure ascii flag is False when ascii and non-ascii characters are
        mixed in output of Unicode slicing.
        c                 J    | d d d   j                   | dd d   j                   fS )Nrt  r  	_is_asciir   s    r   fz,TestUnicode.test_slice_ascii_flag.<locals>.f  s+    SqS6##Qqt!tW%6%666r   u    ¿abc¡Y tú, quién te cre		es?)r   r  Nr   rZ  r.  r  r   s      r   test_slice_ascii_flagz!TestUnicode.test_slice_ascii_flag  s1    
 
	7 
	7 11v&r   c           	      T   t         }t        |      }g d}| j                  t              5 } ||d   d       d d d        | j	                  dt        j                               |D ]3  }t        dd      D ]"  }| j                   |||       |||             $ 5 y # 1 sw Y   gxY w)N)r4  z+asciiz-asciiz-asc ii-r5  z-12345z+12345r   u   ¡Y tú crs?r8  u   +🐍⚡u   -🐍⚡u   大眼，小手。u   +大眼，小手。u   -大眼，小手。r   rA  z<width> must be an Integerrf  )	r@   r   r  r   r  r  r  r  rZ  )r.  rU  rV  ZFILL_INPUTSr  r   widths          r   
test_zfillzTestUnicode.test_zfill  s    V
$ {+ 	(v,q/3'	(2C8H8H4IJ 	2Ar2 2  5!1!&q%22	2		( 	(s   BB'c                     t         }t        |      }t        D ];  }t        d d d   D ]*  }| j                   |||       |||      d|d|d       , = y Nrm  r  z' + 'r  )rC   r   rY  rZ  r`  s         r   test_concatzTestUnicode.test_concat  s^    V! 	:A%dd+ :  1!&q!34a!8::	:r   c           	          t         }t        |      }t        D ]I  }dD ]B  }| j                   |||       |||             | j                   |||       |||             D K y )N)rm  r   r  rt  r  ro  r  r3  rB     F   )rF   r   rY  rZ  r`  s         r   test_repeatzTestUnicode.test_repeat  sl    V! 	.A9 .  1!&q!.  1!&q!..	.r   c                     | j                          t        t              }| j                  t              5 } |dd       d d d        | j                  t        dz   t        j                               y # 1 sw Y   6xY w)Nhig      @z" Function(<built-in function mul>))	r  r   rF   r  r   r  r   r  r  r5  s      r   test_repeat_exception_floatz'TestUnicode.test_repeat_exception_float  si    !^${+ 	v$	l%II&**+	-	 	s   
A44A=c                    | j                          t        }t        |      }||fD ]N  }| j                  t              5 } |dd       d d d        | j                  dt        j                               P y # 1 sw Y   1xY wNrJ  r   r  )r  r   r   r  r  r  r  r  r.  rU  rV  r  r  s        r   test_split_exception_empty_sepz*TestUnicode.test_split_exception_empty_sep  s{    !V UO 	DD"":. &S"MM+S1A1A-BC	D    
A88B	c                     t         }t        |      }dD ]S  }| j                  t              5 } |d|d       d d d        | j	                  dt        j                        d|z         U y # 1 sw Y   5xY w)NrA  NrJ  r  r<  z"non-integer maxsplit with sep = %s)r   r   r  r   r  r  r  )r.  rU  rV  rV   r  s        r   (test_split_exception_noninteger_maxsplitz4TestUnicode.test_split_exception_noninteger_maxsplit  sx    ,V  	FC"";/ %6c3$%MM)S)9)9%:>DF	F% %s   A++A4	c           
          t         }t        |      }g d}|D ]-  \  }}| j                   |||       |||      d|d|d       / y )N
) a Nr  r  r  r  r  r  r  r  r  r  z	'.split('')?)r   r   rZ  )r.  rU  rV  r  test_strsplitters         r   
test_splitzTestUnicode.test_split  sY    V
 #( 	IHhVHh7"8X64<hGI	Ir   c           
          g d}t         dft        dffD ]D  \  }}t        |      }|D ]/  \  }}}| j                   ||||       ||||      ||||fz         1 F y )N
)r  Nr  )r   r  r  )r  r  r  )r8  r  r  )r  r  r  )r  rJ  rt  )r  r:  r  )r  r   rt  )r  r<  r  )r  rK  r  z'%s'.split('%s', %d)?z'%s'.split('%s', maxsplit=%d)?)r   r   r   rZ  )r.  r  rU  fmt_strrV  r  r  r   s           r   test_split_with_maxsplitz$TestUnicode.test_split_with_maxsplit  s    
 "=!8!:!B!A!C D 		KOFG
 LE05 K,(H  (H!E!&x8!D!(Hh+I!IKK		Kr   c                     t         }t        |      }dj                  t        t        g d            }ddddddd|z   d	z   g}|D ]%  }| j                   ||       ||      d
|d       ' y )Nr   	   re     r4                           i  i    i   i   i   i   i   i   i   i   i	   i
   i(   i)   i/   i_   i 0  r     🐍 ⚡   🐍 ⚡ 🐍   🐍   ⚡ 🐍       🐍   ⚡ 🐍    🐍
   ⚡ 🐍  r  z
'.split()?)r   r   r   mapr'  rZ  )r.  rU  rV  all_whitespacer  r  s         r   test_split_whitespacez!TestUnicode.test_split_whitespace  s     *V S +
 "  n$|3
  	<HVH-"8_08:<	<r   c                 b   t         }t        |      }t        j                  t        t        j
                  t        f}dD ]c  \  }}| j                  t              5 } |d|       d d d        dj                  ||      }| j                  |t        j                               e y # 1 sw Y   CxY w)N))noneN)r:  None
z"keepends" must be {}, not {})r   r   r   r  r  Booleanr5   r  r   r  r  r  r  )r.  rU  rV  r  tyr   r  r  s           r   %test_split_exception_invalid_keependsz1TestUnicode.test_split_exception_invalid_keepends0  s    1V--emmTBF 	6LB"";/ &6dH%&188LCMM#s6#3#345		6& &s   
B%%B.	c                     t         }t        |      }g d}d}|D ]1  }| j                   ||       ||      |j                  |             3 y )Nr   r  z
abcabc
u   🐍⚡u   🐍⚡🐍u    aba babaz

abcz*Results of "{}".splitlines() must be equalr  )r   r   rZ  r  r  s         r   test_splitlineszTestUnicode.test_splitlines;  sU    #VM ; 	EAVAYacjjmD	Er   c           
          t         t        g}ddg}g d}g d}t        ||      D ]V  \  }}t        |      }t	        ||      D ]7  \  }}	| j                   |||	       |||	      |j                  ||	             9 X y )Nz,Results of "{}".splitlines({}) must be equalz5Results of "{}".splitlines(keepends={}) must be equalr  )TFr   r  rm  d   r  )r   r   r  r   r   rZ  r  )
r.  rp  r  r  all_keependsrU  r  rV  r   r   s
             r   test_splitlines_with_keependsz)TestUnicode.test_splitlines_with_keependsF  s    ,2

 ;C
M3w1 	>KFCLE&ul; >8  8!4eAx6H%(ZZ8%< ! >>	>r   c                    | j                          t        }t        |      }||fD ]N  }| j                  t              5 } |dd       d d d        | j                  dt        j                               P y # 1 sw Y   1xY wr  )r  r   r   r  r  r  r  r  r  s        r   test_rsplit_exception_empty_sepz+TestUnicode.test_rsplit_exception_empty_sepY  s{    !V UO 	DD"":. &S"MM+S1A1A-BC	D r  c                 4   t         }t        |      }t        j                  t        f}dD ]`  }| j                  t              5 } |d|d       d d d        dj                  |      }| j                  |t        j                               b y # 1 sw Y   BxY w)Nr  rJ  r  z "maxsplit" must be {}, not float)r   r   r   r  r  r  r   r  r  r  r  )r.  rU  rV  r  rV   r  r  s          r   )test_rsplit_exception_noninteger_maxsplitz5TestUnicode.test_rsplit_exception_noninteger_maxsplite  s    -V--- 	6C"";/ %6c3$%4;;NKCMM#s6#3#345		6% %s   BB	c           	          t         }t        |      }g d}d}|D ]7  \  }}| j                   |||       |||      |j                  ||             9 y )Nr  z*Results of "{}".rsplit("{}") must be equalr  )r   r   rZ  r  r  s          r   test_rsplitzTestUnicode.test_rsplitp  sb    V
 ; 	5FAsVAs^U1c]!$As!3  5	5r   c                     t         t        g}g d}ddg}t        ||      D ]P  \  }}t        |      }|D ];  \  }}}	| j	                   ||||	       ||||	      |j                  |||	             = R y )Nr  z.Results of "{}".rsplit("{}", {}) must be equalz7Results of "{}".rsplit("{}", maxsplit={}) must be equalr  )r   r   r  r   rZ  r  )
r.  rp  r  r  rU  r  rV  r  rV   r   s
             r   test_rsplit_with_maxsplitz%TestUnicode.test_rsplit_with_maxsplit  s    /57
 =E

 w1 	JKFCLE+0 J'#x  #x!@!&xh!?%(ZZ#x%H ! JJ	Jr   c                     t         }t        |      }dj                  t        t        g d            }ddddddd|z   d	z   g}d
}|D ]0  }| j                   ||       ||      |j                  |             2 y )Nr   r  r  r  r  r  r  r  r  z&Results of "{}".rsplit() must be equal)r   r   r   r  r'  rZ  r  )r.  rU  rV  r  r  r  r   s          r   test_rsplit_whitespacez"TestUnicode.test_rsplit_whitespace  s    *V S +
 "  n$|3
 7 	AAVAYa#**Q-@	Ar   c                     t         }t        |      }ddg}|D ]%  }| j                   ||       ||      d|d       ' y )Nr      🐍🐍🐍r  z'.join([])?)r   r   rZ  )r.  rU  rV  r  rV   s        r   test_join_emptyzTestUnicode.test_join_empty  sS     $V 

  	8CVC["3Z1468	8r   c                    t         }t        |      }| j                  t              5 } |dg d       d d d        t	        j
                        }| j                  d|       | j                  d|       y # 1 sw Y   CxY w)Nr   )r  rt  r  z,During: resolving callee type: BoundFunctionzreflected list(int)r   r   r  r   r  r  r  )r.  rU  rV  r  exc_messages        r   test_join_non_string_exceptionz*TestUnicode.test_join_non_string_exception  sv    V {+ 	!v"i 	!
 &**+:	

 	*K8	! 	!s   A55A>c           
          t         }t        |      }dg dfdg dfdg dfddgdz  fg}|D ]-  \  }}| j                   |||       |||      d|d	|d
       / y )Nr   )r   r   r   rJ  )rJ  bbbbr   r     ⚡⚡r  r  '.join('r  r   r   rZ  r.  rU  rV  r  rV   partss         r   	test_joinzTestUnicode.test_join  s    V ,#$hZ!^,	
   	@JCVC/"3.36>@	@r   c           
          t         }t        |      }ddg}|D ]-  \  }}| j                   |||       |||      d|d|d       / y )N)rH  123)r  r  r  r  r  r  r  s         r   test_join_interleave_strz$TestUnicode.test_join_interleave_str  s`    V &

   	@JCVC/"3.36>@	@r   c                    t         dft        dft        dffD ]  \  }}t        |      }| j	                  t
              5 } |t        d   d       d d d        | j                  dt        j                               t        D ]:  }t        dd      D ])  }| j                   |||       |||      d	|||fz         + <  y # 1 sw Y   txY w)
Nr   r   r   r   rA  The width must be an Integerr  rf  z'%s'.%s(%d)?)r   r   r   r   r  r   rY  r  r  r  r  rZ  )r.  rU  	case_namerV  r  r   r  s          r   test_justificationzTestUnicode.test_justification  s    #18"<#0'":#0'":"< 	MFI LE"";/ 06&q)3/0MM8#f>N>N:OP% M"2r] ME$$VAu%5%*1e_%3q)U6K%KMMM	M
0 0s   CC	c                    t         dft        dft        dffD ]  \  }}t        |      }dD ]  }| j	                  t
              5 } |t        d   d|       d d d        | j                  dt        j                               t        D ]=  }t        dd	      D ],  }| j                   ||||       ||||      d
||||fz         . ?   y # 1 sw Y   yxY w)Nr   r   r   )rA  +   úu   处r   rA  r  r  rf  z'%s'.%s(%d, '%s')?)r   r   r  r   r  r   rY  r  r  r  r  rZ  )r.  rU  r  rV  r   r  r   r  s           r   test_justification_fillcharz'TestUnicode.test_justification_fillchar  s   #:H"E#97"C#97"C"E 	LFI LE 4 L&&{3 >v*1-sH=><!&"2"235 * LA!&r2 L((5()C).q%)B)=IAFAIAK *KLLLL	L> >s   CCc                    | j                          t        t        t        fD ]  }t	        |      }dD ]V  }| j                  t              5 } |t        d   d|       d d d        | j                  dt        j                               X dD ]V  }| j                  t              5 } |t        d   d|       d d d        | j                  dt        j                               X  y # 1 sw Y   xY w# 1 sw Y   ?xY w)N)r   z+0u   quiénu   处着r   rf  z&The fill character must be exactly one)r  rA  z"The fillchar must be a UnicodeType)r  r   r   r  r   r  r  rY  r  r  r  r   )r.  rU  rV  r   r  s        r   %test_justification_fillchar_exceptionz1TestUnicode.test_justification_fillchar_exception!  s    !.--/ 	5F LE ; 5&&z2 =f*1-r8<=F!&"2"2355 % 5&&{3 =v*1-r8<=B!&"2"2355	5= == =s   
C)%C5)C25C>c                     t         }t        |      }t        D ];  }t        d d d   D ]*  }| j                   |||       |||      d|d|d       , = y r  )rH   r   rY  rZ  r`  s         r   test_inplace_concatzTestUnicode.test_inplace_concat7  s^    'V! 	:A%dd+ :  1!&q!34a!8::	:r   c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isidentifierr   s    r   rU  z-TestUnicode.test_isidentifier.<locals>.pyfuncA  s    >>##r   )rJ  Zr  b0bcb_   µu   𝔘𝔫𝔦𝔠𝔬𝔡𝔢rA  [   ©0   u   u   u   u   abu   abu	   abau	   abaz,Results of "{}".isidentifier() must be equalr   r  r   rY  rZ  r  r.  rU  rV  cpythoncpython_extrasr  r   s          r   test_isidentifierzTestUnicode.test_isidentifier@  sp    	$ VH@ =!RD(72^C 	EAVAYacjjmD	Er   c                    g d}t         dft        dft        dffD ]@  \  }t              }|D ]+  \  }}| j	                   |       ||      d|d|d       - B t
        dft        dft        dffD ]   \  }t              }t        j                  t        j                  t        j                  t        j                              } t        |g            }fd}||fD ]N  }	| j                  t              5 }
 |	d	d
       d d d        | j                  dt        
j                               P ||fD ]7  }	|D ]0  \  }}| j	                   ||       |	||      d|d|d|d       2 9  y # 1 sw Y   rxY w)N))ass ciiai)r  N)assciiai )zasscii r"  )	 asscii  r"  )r#  zasci )r#  r   )z      rA  )r   rA  r@  )r   Nr  )
  asscii  r"  )r$  r   )r$  N)rH     étú? )     tú quién te crees?   r%  )u     tú qrees?   r   )r&  NrG  )    大处大处  r   )z	
abcd	z	a)r'  N)z	 abcd 	N)z
 abcd 
N)z abcd N)z abcd N)z abcd N)u
    abcd N)u	   abcd Nr   r   r   r  z'.z()?c                      t        j                  t         j                  t        j                  t         j                              } t	        |g             y r&   )r   r:  r;  r<  r   )r=  badrU  s     r   r?  z8TestUnicode.test_strip.<locals>.try_compile_bad_optional  s<    ((););).)FHcUF#r   r@  rA  z%The arg must be a UnicodeType or Nonez('r  )r   r   r   r   rZ  r   r   r   r   r:  r;  r  r   r  r  r  )r.  STRIP_CASESr  rV  stringr   sig1rD  r?  r  r  rU  s              @r   
test_stripzTestUnicode.test_stripQ  s   
D $1'":#18"<#18"<"> 	EFI LE!, E  !&v17!CEE	E $7"@#7"B#7"B"D 	AFI LE%%e&8&8&+nnU5G5G&HJD)T4&\&1N$
 55 5&&{3 )v{C()E!&"2"2355 ^+ A%0 AMFE$$VFE%:%'%69?9>&@AAA)	A) )s   
E<<Fc                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isspacer   s    r   rU  z(TestUnicode.test_isspace.<locals>.pyfunc      99;r   )	u    u    u   —   𐐁   𐐧   𐐩   𐑎   🐍   👯r  z'Results of "{}".isspace() must be equalr   r  r  r  s          r   test_isspacezTestUnicode.test_isspace  sp    	 VK@ 8!RD(72^C 	EAVAYacjjmD	Er   c           
         t         }t        |      }d}t        D cg c]  }|j                          }}g d}t        |z   |z   }|D ]6  } ||      }	 ||      }
| j	                  |	|
|j                  ||	|
             8 y c c}w )Nz0'{0}'.py_istitle() = {1}
'{0}'.c_istitle() = {2})r   z    z  AA  z  Ab  1A123A12Bcdz+abA12AbcA12abcu   %^Abc 5 $% Def𐐁𐐩u   𐐧𐑎r4  r5  u   🐍 Isu   🐍 NOTu   👯Is   ῼu   Greek ῼitlecases ...)r  r   rY  r  rZ  r  )r.  rU  rV  r#  r(   unicode_titlespecialISTITLE_EXAMPLESr   r%  r&  s              r   test_istitlezTestUnicode.test_istitle  s     VG	,<=q==
, ,m;gE! 	GAq	IQxHY&--aHEG	G3 >s   Bc                     d }t        |      }g d}d}t        |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isprintabler   s    r   rU  z,TestUnicode.test_isprintable.<locals>.pyfunc  s    ==?"r   )	r   rA  abcdefgzabcdefg
u   ʹu   ͸r  r7  u   󠀠z+Results of "{}".isprintable() must be equalr  r  r.  rU  rV  r  r  r   s         r   test_isprintablezTestUnicode.test_isprintable  s[    	# V9 <!G+ 	EAVAYacjjmD	Er   c                 V    d }t        |      }dg}| j                   ||  ||        y )Nc                     | d d  S r&   r#   rJ  s    r   rU  z0TestUnicode.test_pointless_slice.<locals>.pyfunc  s    Q4Kr   rJ  r  r.  r\  rU  rV  r=  s        r   test_pointless_slicez TestUnicode.test_pointless_slice  s/    	Vut5r   c                 V    d }t        |      }dg}| j                   ||  ||        y )Nc                     | d d d   S )Nrm  r#   rL  s    r   rU  z/TestUnicode.test_walk_backwards.<locals>.pyfunc  s    TrT7Nr   rJ  r  rM  s        r   test_walk_backwardszTestUnicode.test_walk_backwards  s/    	Vut5r   c                 V    d }t        |      }dg}| j                   ||  ||        y )Nc                     | d d d   S Nrt  r#   rL  s    r   rU  z-TestUnicode.test_stride_slice.<locals>.pyfunc  s    SqS6Mr   rJ  r  rM  s        r   test_stride_slicezTestUnicode.test_stride_slice  s/    	Vut5r   c                 X    d }t        |      }ddg}| j                   ||  ||        y )Nc                     | |k  S r&   r#   rJ  r:  s     r   rU  z)TestUnicode.test_basic_lt.<locals>.pyfunc      q5Lr   r<  r:  r  rM  s        r   test_basic_ltzTestUnicode.test_basic_lt  1    	Vc{t5r   c                 X    d }t        |      }ddg}| j                   ||  ||        y )Nc                     | |kD  S r&   r#   rX  s     r   rU  z)TestUnicode.test_basic_gt.<locals>.pyfunc  rY  r   r<  r:  r  rM  s        r   test_basic_gtzTestUnicode.test_basic_gt  r[  r   c           	          d }t        |      }t        t        d      D ]:  \  }}dD ]0  }|||g}| j                   ||  || dj	                  |             2 < y )Nc                 |    | dk(  r||k(  S | dk(  r||k7  S | dk(  r||k  S | dk(  r||kD  S | dk(  r||k  S | dk(  r||k\  S y )N==!=<><=>=r#   optionr(   r,   s      r   rU  z+TestUnicode.test_comparison.<locals>.pyfunc  se    ~Av4Av31u31u4Av4Avr   rt  ru  ra  rb  rc  rd  re  rf  r   failed on {}r  )r   r   rw  rZ  r  )r.  rU  rV  r(   r,   cmpopr=  s          r   test_comparisonzTestUnicode.test_comparison   sy    	  V !:a@ 	BDAq? Bq!}  t%3%:%:4%@ ! BB	Br   c                     d }t        |      }dg}| j                   ||  ||        dg}| j                   ||  ||        y )Nc                 H    d}t        |       r|dz   | z   dz   S | |z   dz   | z   S )NrH  b123IOr  r0   )r(   rH  s     r   rU  z/TestUnicode.test_literal_concat.<locals>.pyfunc  s5    C1vV|a'$..3w**r   r(   r   r  r.  rU  rV  r=  s       r   test_literal_concatzTestUnicode.test_literal_concat  sP    	+ Vut5tt5r   c                     d }t        |      }dD ].  }|g}| j                   ||  || dj                  |             0 y )Nc                     d}d}| dk(  r||k(  S | dk(  r||k7  S | dk(  r||k  S | dk(  r||kD  S | dk(  r||k  S | dk(  r||k\  S y )	Na123aa12ra  rb  rc  rd  re  rf  r#   rg  s      r   rU  z3TestUnicode.test_literal_comparison.<locals>.pyfunc(  so    AA~Av4Av31u31u4Av4Avr   ri  rj  r  r   rZ  r  )r.  rU  rV  rk  r=  s        r   test_literal_comparisonz#TestUnicode.test_literal_comparison'  sU    	$ V; 	>E7DVT]E4L!/!6!6t!<  >	>r   c                 X    d }t        |      }| j                   |        |              y )Nc                      t        d      S NrH  r0   r#   r   r   rU  z,TestUnicode.test_literal_len.<locals>.pyfuncA  s    u:r   r  rT  s      r   test_literal_lenzTestUnicode.test_literal_len@  s$    	V57+r   c                     d }t        |      }dddt        dd       t        d d      fD ].  }|g}| j                   ||  || dj                  |             0 y )Nc                     d|    S r{  r#   )whichs    r   rU  z0TestUnicode.test_literal_getitem.<locals>.pyfuncG  s    <r   rm  r   r  rj  r  )r   r  rZ  r  r.  rU  rV  rJ  r=  s        r   test_literal_getitemz TestUnicode.test_literal_getitemF  sj    	 VaE!TNE$O< 	>A3DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }dD ].  }|g}| j                   ||  || dj                  |             0 y )Nc                 
    | dv S )N
9876zabiuhr#   r'   s    r   rU  z+TestUnicode.test_literal_in.<locals>.pyfuncP  s    $$r   )rJ  9r:  r   8uha987rj  r  rw  r  s        r   test_literal_inzTestUnicode.test_literal_inO  sU    	% V3 	>A3DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }t        dd      D ]+  }| j                   ||  || dj                  |             - y )Nc                 F    dj                  |       dj                  |      fS )NrH  cde)r   r   r+   s     r   rU  z0TestUnicode.test_literal_xyzwith.<locals>.pyfuncZ  s!    ##A&q(999r   rG  rt  ru  rj  r  )r   r   rZ  r  rq  s       r   test_literal_xyzwithz TestUnicode.test_literal_xyzwithY  sU    	: V a0 	>DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }dD ].  }|g}| j                   ||  || dj                  |             0 y )Nc                 F    dj                  |       | j                  d      fS )NrH  rJ  rY   r'   s    r   rU  z-TestUnicode.test_literal_find.<locals>.pyfuncc  s    ::a=!&&+--r   )r<  rj  r  rw  r  s        r   test_literal_findzTestUnicode.test_literal_findb  sU    	. V 	>A3DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }t        D ].  }|g}| j                   ||  || dj                  |             0 y )Nc                     |  S r&   r#   r'   s    r   rU  z$TestUnicode.test_not.<locals>.pyfuncm  s	    5Lr   rj  r  r  r  s        r   test_notzTestUnicode.test_notl  sU    	 V! 	>A3DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }g d}dg}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )
capitalizer'   s    r   rU  z+TestUnicode.test_capitalize.<locals>.pyfuncw  s    <<>!r   )	   𐑏   𐑏𐑏   𐐧𐑏   𐑏𐐧
   X𐐧x𐑏u   hİu   ῒİu   ﬁnnish   AͅΣ   𐀀􀀀z*Results of "{}".capitalize() must be equalr   r  r  r  s          r   test_capitalizezTestUnicode.test_capitalizev  sp    	" V@ 11:!RD(72^C 	EAVAYacjjmD	Er   c                 0   d }t        |      }t        D cg c]  }|j                          }}g d}g d}|D cg c]  }|dz  	 }}t        |z   |z   |z   |z   D ].  }|g}	| j                   ||	  ||	 dj	                  |	             0 y c c}w c c}w )Nc                 "    | j                         S r&   )isupperr'   s    r   rU  z(TestUnicode.test_isupper.<locals>.pyfunc  r1  r   AA12Aaa12au   大AA12Au   大aa12au   AAAǄAu	   A 1 1 大u   Ⅷ   ⅷr2  r3  r4  r5  r6  r7  ro  rj  r  )r   rY  upperrZ  r  )
r.  rU  rV  r(   uppersr  r  fourxcpyrJ  r=  s
             r   test_isupperzTestUnicode.test_isupper  s    	 V%56!'')66R=#*+aAE++!F*V3g=H 	>A3DVT]E4L!/!6!6t!<  >	> 7 ,s
   BBc                     d }t        |      }t        D ].  }|g}| j                   ||  || dj                  |             0 y )Nc                 "    | j                         S r&   )r  r'   s    r   rU  z&TestUnicode.test_upper.<locals>.pyfunc  s    779r   rj  r  r  r  s        r   
test_upperzTestUnicode.test_upper  sU    	 V! 	>A3DVT]E4L!/!6!6t!<  >	>r   c                     d }t        |      }g d}dg}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )casefoldr'   s    r   rU  z)TestUnicode.test_casefold.<locals>.pyfunc      ::<r   )r  hELlo   ß   ﬁ   Σr  r  r  z(Results of "{}".casefold() must be equalr   r  r  r  s          r   test_casefoldzTestUnicode.test_casefold  so    	  V. 118!RD(72^C 	EAVAYacjjmD	Er   c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isalphar'   s    r   rU  z(TestUnicode.test_isalpha.<locals>.pyfunc  r1  r   )r?  r2  r3  r4  r5  r6  r7  r  z'Results of "{}".isalpha() must be equalr   r  r  r.  rU  rV  r  r  r  r   s          r   test_isalphazTestUnicode.test_isalpha  sn    	 V=8 8!RD(61G; 	EAVAYacjjmD	Er   c                     d }t        |      }g d}d}t        |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )r   r'   s    r   rU  z(TestUnicode.test_isascii.<locals>.pyfunc  r1  r   )r    z       érA  z'Results of "{}".isascii() must be equalr  r  rH  s         r   test_isasciizTestUnicode.test_isascii  sZ    	 V H7!G+ 	EAVAYacjjmD	Er   c                     t         }t        |      }g d}d}t        dgz   |z   D ]1  }| j                   ||       ||      |j	                  |             3 y )N)	r  r  u   𐑏𐑏 𐑏𐑏u   𐐧𐑏 𐐧𐑏u   𐑏𐐧 𐑏𐐧u   X𐐧x𐑏 X𐐧x𐑏u   ﬁNNISHu	   AΣ ᾡxyu   AΣAz%Results of "{}".title() must be equalr   r  )r  r   rY  rZ  r  rH  s         r   
test_titlezTestUnicode.test_title  s`    V? 6!RD(72 	EAVAYacjjmD	Er   c                     d }t        |      }g d}dg}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )swapcaser'   s    r   rU  z)TestUnicode.test_swapcase.<locals>.pyfunc  r  r   )r  r3  r  r  r  r  r     İr     ͅΣr     AͅΣar  u   AΣͅ   Σͅ r  r  u   ῒr  z(Results of "{}".swapcase() must be equalr   r  r  r  s          r   test_swapcasezTestUnicode.test_swapcase  so    	  V- 118!RD(72^C 	EAVAYacjjmD	Er   c                 J   t         }t        |      }t        D cg c]  }|j                          }}g d}g d}||D cg c]  }|dz  	 c}z  }d}t        |z   dgz   |z   |z   D ]1  }| j	                   ||       ||      |j                  |             3 y c c}w c c}w )Nr  r  ro  z'Results of "{}".islower() must be equalr   r  )r   r   rY  r"  rZ  r  )	r.  rU  rV  r(   lowersr  r  r  r   s	            r   test_islowerzTestUnicode.test_islower  s     V%56!'')66RK7+aAE++7!F*bT1F:WD 	EAVAYacjjmD	E 7 ,s   B B c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isalnumr'   s    r   rU  z(TestUnicode.test_isalnum.<locals>.pyfunc	  r1  r   )r2  r3  r4  r5     𝟶   𑁦   𐒠   🄇r  z'Results of "{}".isalnum() must be equalr   r  r  r  s          r   test_isalnumzTestUnicode.test_isalnum	  so    	 VK8 8!RD(61G; 	EAVAYacjjmD	Er   c                     t         }t        |      }g d}g d}g d}d}|j                  |       d}t        dgz   |z   |z   |z   D ]1  }| j	                   ||       ||      |j                  |             3 y )Nr  )r2  r3  r5  r7  u   𐐧𐐧r  r  r  )r  r  r  r  r  u   򏿾r  u   AΣ΢z%Results of "{}".lower() must be equalr   r  )r#  r   r	  rY  rZ  r  )	r.  rU  rV  r  r  sigmaextra_sigmar  r   s	            r   
test_lowerzTestUnicode.test_lower	  s    VR7: &[!5!RD(61G;eC 	EAVAYacjjmD	Er   c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )	isnumericr'   s    r   rU  z*TestUnicode.test_isnumeric.<locals>.pyfunc/	      ;;= r   )r   rJ  r     ①   ¼   ٠
01234567890123456789ar2  r3  r4  r5  r6  r7     𑁥r  r  r  r  r  z)Results of "{}".isnumeric() must be equalr   r  r  r  s          r   test_isnumericzTestUnicode.test_isnumeric.	  o    	! VK
- :!RD(72^C 	EAVAYacjjmD	Er   c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )isdigitr'   s    r   rU  z(TestUnicode.test_isdigit.<locals>.pyfuncB	  r1  r   )r  r  r  r2  r3  r4  r5  r6  r7  r  r  r  r  r  r  z'Results of "{}".isdigit() must be equalr   r  r  r  s          r   test_isdigitzTestUnicode.test_isdigitA	  so    	 V!
@ 8!RD(72^C 	EAVAYacjjmD	Er   c                     d }t        |      }g d}g d}d}t        dgz   |z   |z   D ]1  }| j                   ||       ||      |j                  |             3 y )Nc                 "    | j                         S r&   )	isdecimalr'   s    r   rU  z*TestUnicode.test_isdecimal.<locals>.pyfuncU	  r  r   )r   rJ  r  r  r  r  r  r  r2  r3  r4  r5  r6  r7  r  r  r  r  r  r  z)Results of "{}".isdecimal() must be equalr   r  r  r  s          r   test_isdecimalzTestUnicode.test_isdecimalT	  r  r   c                     t         }t        |      }g d}|D ]3  \  }}}| j                   ||||       ||||      d|d|d|d       5 y )N
)rH  r   A)r   r  r  )r  r  r  )r8  r  r  )r  r  r  )r  rJ  r  )r  r:  r  )r  r   r  )r  r<  r  )r  rK  r  r  '.replace('', 'r  )r}   r   rZ  )r.  rU  rV  r  r  old_strnew_strs          r   test_replacezTestUnicode.test_replaceg	  s`     V
 +0 	;&HgwVHgw?"8Wg>&:;	;r   c                     t         }t        |      }g d}g d}|D ]?  \  }}}|D ]4  }| j                   |||||       |||||      d|d|d|d|d	       6 A y )Nr  )rm  r  r   r  r  r  r  r  )r   r   rZ  )	r.  rU  rV  r  
count_testr  r  r  rj   s	            r   test_replace_with_countz#TestUnicode.test_replace_with_count~	  s    +V
 #
*/ 	F&Hgw# F  '7E!J!&x'5!I"*GWe"EFF	Fr   c                 H   d }t        |      }| j                  t              5 } |dddd       d d d        d}| j                  |t	        j
                               | j                  t              5 } |dddd       d d d        d	}| j                  |t	        |j
                               | j                  t              5 } |dddd       d d d        d	}| j                  |t	        |j
                               y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   IxY w)
Nc                 (    | j                  |||      S r&   r{   r   s       r   rU  z4TestUnicode.test_replace_unsupported.<locals>.pyfunc	  s    99Q5))r   
abababababbaqqqg      @z7Unsupported parameters. The parameters must be Integer.r   r  z!The object must be a UnicodeType.)r   r  r   r  r  r  )r.  rU  rV  r  r  s        r   test_replace_unsupportedz$TestUnicode.test_replace_unsupported	  s   	* V{+ 	2v,eS1	2Gc3v//01{+ 	-v,5!,	-1c3v//01{+ 	,v,a+	,1c3v//01	2 	2
	- 	-
	, 	,s#   D 4DD D	DD!N)~r0  r1  r2  rW  r	   r]  ra  rq  ry  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r   r'  r,  r0  r6  rE  rR  rT  rV  rY  r[  rd  rh  rk  rr  rt  rv  rx  r{  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r-  r8  rC  rI  rN  rQ  rU  rZ  r^  rl  rr  rx  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r#   r   r   rQ  rQ    s   3
 &4 2 + A?,4 + , + , + , + , , 2 - 2	EA2F>"G$3&3"G&=&H*Q.@*E2 + @2$5( - =8
HM	62$5(	L9(96-$5:=:
HM:>(28=0=0L8Q:F:	:77N
A
AAKK*K
'2> !/ : !/ .-
D	FI,K2<:	6	E>&
D	65*J6A48 9&@ @M L*5, )7 :E"HATE""GHE *8 6 )7 6 '5 6 #1 6 #1 6B26>2,>>>>>E">&>EE$EE E&E E$E.E&E&E&;.F42r   rQ  c                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)TestUnicodeInTuplec                     t         d        }| j                  |j                          |              t         d        }| j                  |j                          |              y )Nc                      ddk  S )N)rO  bbr#   r#   r   r   r  z9TestUnicodeInTuple.test_const_unicode_in_tuple.<locals>.f	      W$$r   c                      ddk  S )N)ccr  r#   r#   r   r   r  z9TestUnicodeInTuple.test_const_unicode_in_tuple.<locals>.f	  r  r   r   rZ  rn  r.  r  s     r   test_const_unicode_in_tuplez.TestUnicodeInTuple.test_const_unicode_in_tuple	  sZ    		% 
	% 	ac*		% 
	% 	ac*r   c                     t         d        }| j                  |j                          |              t         d        }| j                  |j                          |              y )Nc                      ddk  S )NrO  r  )r  r  r#   r#   r   r   r  z@TestUnicodeInTuple.test_const_unicode_in_hetero_tuple.<locals>.f	      y((r   c                      ddk  S )Nr  )rO  rt  r#   r#   r   r   r  z@TestUnicodeInTuple.test_const_unicode_in_hetero_tuple.<locals>.f	  r  r   r	  r
  s     r   "test_const_unicode_in_hetero_tuplez5TestUnicodeInTuple.test_const_unicode_in_hetero_tuple	  sZ    		) 
	) 	ac*		) 
	) 	ac*r   c                 t    t         d        }t        D ]#  }| j                   ||      t        |             % y )Nc                     | j                   S r&   r  r   s    r   r  z3TestUnicodeInTuple.test_ascii_flag_unbox.<locals>.f	  s    ;;r   )r   rY  rZ  r   r  s      r   test_ascii_flag_unboxz(TestUnicodeInTuple.test_ascii_flag_unbox	  s=    		 
	 " 	/AQqT71:.	/r   c                 J    t         d        }| j                   |       d       y )Nc                      d} d}d}d}dj                  | |g      j                  dj                  | |g      j                  dj                  | |g      j                  dj                  ||g      j                  fS )NrH  r  r8  r"   ,)r   r  s1s2s3s4s       r   r  z2TestUnicodeInTuple.test_ascii_flag_join.<locals>.f	  sx    BBB1BHHb"X&00NNB8,66HHb"X&00HHb"X&002 2r   )r  r   r   r   r  r
  s     r   test_ascii_flag_joinz'TestUnicodeInTuple.test_ascii_flag_join	  s(    		2 
	2 	l+r   c                 J    t         d        }| j                   |       d       y )Nc                  ~    d} d}| d   j                   | dd  j                   |d   j                   |dd  j                   fS )Nabc123u   🐍⚡🐍⚡🐍⚡r   rt  r  )r  r  s     r   r  z5TestUnicodeInTuple.test_ascii_flag_getitem.<locals>.f	  sH    B(BqEOORV%5%5r!uqrF$$& &r   )r  r  r   r   r  r
  s     r   test_ascii_flag_getitemz*TestUnicodeInTuple.test_ascii_flag_getitem	  s(    		& 
	& 	l+r   c                 J    t         d        }| j                   |       d       y )Nc                      d} d}d}d}| |z   j                   | |z   j                   ||z   j                   | dz  j                   |dz  j                   fS )NrH  r  r8  r"   rt  r  r  s       r   r  z5TestUnicodeInTuple.test_ascii_flag_add_mul.<locals>.f	  sa    BBB1B"W''"W''"W''!V&&!V&&	( (r   )r  r   r   r  r   r  r
  s     r   test_ascii_flag_add_mulz*TestUnicodeInTuple.test_ascii_flag_add_mul	  s(    			( 
		( 	o.r   N)	r0  r1  r2  r  r  r  r  r!  r$  r#   r   r   r  r  	  s     ++/,,/r   r  c                   *    e Zd Zd Zd Zd Zd Zd Zy)TestUnicodeIterationc                 x    t         }t        |      }t        D ]   }| j                   ||       ||             " y r&   )r
  r   rY  rS  r.  rU  rV  rJ  s       r   test_unicode_iterz&TestUnicodeIteration.test_unicode_iter	  s7    V! 	9A##F1IuQx8	9r   c                 ^    t         }t        |      }| j                   |        |              y r&   )r  r   rS  rT  s      r   test_unicode_literal_iterz.TestUnicodeIteration.test_unicode_literal_iter
  s$    %V%'2r   c                 x    t         }t        |      }t        D ]   }| j                   ||       ||             " y r&   )r  r   rY  rS  r(  s       r   test_unicode_enumerate_iterz0TestUnicodeIteration.test_unicode_enumerate_iter
  s7    (V! 	9A##F1IuQx8	9r   c                     | j                          t        }t        |      }||fD ]3  }t        D ](  }| j	                  t
              5   ||       d d d        * 5 y # 1 sw Y   7xY wr&   )r  r  r   rY  r  StopIteration)r.  rU  rV  r  rJ  s        r   test_unicode_stopiteration_iterz4TestUnicodeIteration.test_unicode_stopiteration_iter
  sm    !+V% 	A% &&}5 aD 	 s   	AA&c                     t         }t        |      }||fD ]'  }| j                  t              5   |        d d d        ) y # 1 sw Y   4xY wr&   )r  r   r  r/  )r.  rU  rV  r  s       r   'test_unicode_literal_stopiteration_iterz<TestUnicodeIteration.test_unicode_literal_stopiteration_iter
  sP    3V% 	A""=1  	 s   AA
	N)r0  r1  r2  r)  r+  r-  r0  r2  r#   r   r   r&  r&  	  s    93
9r   r&  c                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)TestUnicodeAuxillaryc                     t         }t        |      }t        D ]'  }|D ]   }| j                   ||       ||             " ) y r&   )r%  r   rY  rS  )r.  rU  rV  exrJ  s        r   test_ordzTestUnicodeAuxillary.test_ord!
  sF    V" 	=B =''q	58<=	=r   c                    | j                          t        }t        |      }||fD ]T  }dD ]M  }| j                  t              5 } ||       d d d        | j                  dt        j                               O V | j                  t              5 } |d       d d d        | j                  t        t        j                               y # 1 sw Y   xY w# 1 sw Y   ?xY w)N)r   rH  zord() expected a charactergGz?)
r  r%  r   r  	TypeErrorr  r  r  r   r   )r.  rU  rV  r  chr  s         r   test_ord_invalidz%TestUnicodeAuxillary.test_ord_invalid(
  s    !V UO 	5D! 5&&y1 VH:!&"2"2355	5 {+ 	v$K	lC(8(8$9: 	 	s   	C	CCC"c                     t         }t        |      }t        D ]2  }|D ]+  }t        |      }| j	                   ||       ||             - 4 dt
        fD ]   }| j	                   ||       ||             " y )Nr   )r(  r   rY  r   rS  r   )r.  rU  rV  r6  r(   rJ  s         r   test_chrzTestUnicodeAuxillary.test_chr;
  s}    V" 	=B =F''q	58<=	=
 |$ 	9A##F1IuQx8	9r   c                    t         }t        |      }||fD ]]  }dt        dz   fD ]M  }| j                  t              5 } ||       d d d        | j                  dt        j                               O _ | j                  t              5 } |d       d d d        | j                  t        t        j                               y # 1 sw Y   xY w# 1 sw Y   ?xY w)Nr  r  zchr() arg not in rangerH  )
r(  r   r   r  r  r  r  r  r   r   )r.  rU  rV  r  vr  s         r   test_chr_invalidz%TestUnicodeAuxillary.test_chr_invalidF
  s    V UO 	OD,*+ O&&z2 fG6F<L<L8MNO	O {+ 	v%L	lC(8(8$9: 
	 	s   	C	CCCc                     d t              d        }t        fd       }d}| j                  |j                  |       ||             | j	                  t
        j                  t
        j                  j                  j                         y )Nc                      y)NTr#   r'   s    r   barz7TestUnicodeAuxillary.test_unicode_type_mro.<locals>.barX
  s    r   c                 ~    dt        | t        j                        rt        | t        j                        rdfdS )NFTc                     S r&   r#   r(   oks    r   <lambda>zLTestUnicodeAuxillary.test_unicode_type_mro.<locals>.ol_bar.<locals>.<lambda>a
  s    R r   )
isinstancer   r  HashablerF  s    @r   ol_barz:TestUnicodeAuxillary.test_unicode_type_mro.<locals>.ol_bar[
  s1    B!U../a0Br   c                      |       S r&   r#   )strinstrC  s    r   rk  z7TestUnicodeAuxillary.test_unicode_type_mro.<locals>.fooc
  s    w<r   rH  )
r   r   rZ  rn  r  r   rJ  r:  r/  __mro__)r.  rK  rk  instrC  s       @r   test_unicode_type_mroz*TestUnicodeAuxillary.test_unicode_type_mroV
  s|    	 
#	  
	  
	  
	  T*CI6enne&8&8&B&B&J&JKr   c                 *   d }d }d }d }d }| j                   |d       t        |      d             | j                   |d       t        |      d             | j                   |d       t        |      d             d	d
g} t        |      |      }dt        |       d}| j                  ||       t        t        f}	| j                  |	      5 }
 t        |      d	d
g       ddd       t        dv r(d}| j                  |t        
j                               n?t        dv r(d}| j                  |t        
j                               nt        t              | j                   |        t        |                    y# 1 sw Y   xY w)z@test f-string support, which requires bytecode handling
        c                     d| dz    dS )NAA_r  _Br#   rL  s    r   impl1z2TestUnicodeAuxillary.test_f_strings.<locals>.impl1o
  s    Qr?"r   c                     | dz    S rT  r#   rL  s    r   impl2z2TestUnicodeAuxillary.test_f_strings.<locals>.impl2s
  s    !eWr   c                     d|  S )NABC_r#   rL  s    r   impl3z2TestUnicodeAuxillary.test_f_strings.<locals>.impl3w
  s    !:r   c                     d| dS )NrY  r  r#   rL  s    r   impl4z2TestUnicodeAuxillary.test_f_strings.<locals>.impl4{
  s    !A<r   c                       S r&   r#   r#   r   r   impl5z2TestUnicodeAuxillary.test_f_strings.<locals>.impl5
  s    Jr   r  rt  DEr  BzABC_<object type:rd  N))r  r  z,Use of unsupported opcode (FORMAT_WITH_SPEC)))r  re  )r  r  )r  r4  z*format spec in f-strings not supported yet)rZ  r   r   r   r   r  r   r  r  r  NotImplementedError)r.  rU  rW  rZ  r\  r^  list_arggotexpectedunsupported_errorsr  r  s               r   test_f_stringsz#TestUnicodeAuxillary.test_f_stringsk
  so   	#			 	 	q;4;q>2q;4;q>2tkd5k$&78 :d5k(#&vh'7&8:h' /0HI12 	$fDKc
#	$
"@CMM#s6#3#34555>CMM#s6#3#345%i00+$u+-0	$ 	$s   F		FN)	r0  r1  r2  r7  r;  r=  r@  rP  rf  r#   r   r   r4  r4  
  s!    =;&	9; L*.1r   r4  __main__)t	itertoolsr   r   numbar   r   
numba.corer   unittestnumba.tests.supportr   r	   r
   numba.core.errorsr   r   r   numba.cpython.unicoder   numba.core.types.functionsr   numba.extendingr   numba.core.utilsr   r   r$   r)   r-   r2   r6   r:   r=   r@   rC   rF   rH   rJ   rL   rN   rP   rR   rW   r[   r`   rd   rg   rk   rm   rp   ru   rw   ry   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r
  r  r  r  r  r  r   r#  r%  r(  r*  rY  rw  r"  rQ  r  r&  r4  r0  mainr#   r   r   <module>rs     s@    "    K K9 9 . 3 $ &(,
!"""#"!)"' % )"+#,!  & &
  "! H|2( |2~?J/ J/Z!8 !Hz18 z1z zHMMO r   