
    MhK                     Z   S r SSKJr  SSKrSSKrSSKJrJr  SSK	J
r  \R                  R                  S5      r\R                  R                  S5      r\R                  R                  S5      rS r\R                  R'                  S	S
0 \" SS/SS/SS//SS/S94S/ SQ/ SQS.\" SS/SS/SS/SS/SS//SS/S94S0 \" SS/SS/SS//SS/S94SS/S/S.\" SS/SS//SS/S94/5      S 5       rS r\R                  R'                  SSS/5      S  5       rS! r\R                  R'                  S"S\R0                  \R2                  /5      S# 5       r\\R                  R'                  S$\R6                  " \R2                  5      R8                  \R6                  " \R0                  5      R8                  \R6                  " \R0                  5      R:                  /5      S% 5       5       r\\R                  R'                  S$\R6                  " \R2                  5      R8                  S-   \R6                  " \R0                  5      R:                  S-
  /5      S& 5       5       r\\R                  R'                  S'\ " S(5      \ " S)5      /\ " S)5      \ " S(5      //5      S* 5       5       r!S+ r"g),zy
Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.
    )StringION)	DataFrameSeriesz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningpyarrow_xfailpyarrow_skipc                     SnU nUR                  [        U5      5      n[        SS/SS/SS//SS	/S
9n[        R                  " X45        g )NzA,B
1.0,1
2.0,2
3.0,3
g      ?   g       @   g      @   ABcolumnsread_csvr   r   tmassert_frame_equalall_parsersdataparserresultexpecteds        Y/var/www/html/env/lib/python3.13/site-packages/pandas/tests/io/parser/common/test_ints.pytest_int_conversionr      sS    D
 F__Xd^,F3(S!HsAh7#sLH&+    zdata,kwargs,expectedzA,B
True,1
False,2
True,3Tr	   Fr
   r   r   r   r   zA,B
YES,1
no,2
yes,3
No,3
Yes,3)yesYesYES)noNONo)true_valuesfalse_valueszA,B
TRUE,1
FALSE,2
TRUE,3zA,B
foo,bar
bar,foofoobarc                 l    U nUR                   " [        U5      40 UD6n[        R                  " XS5        g )N)r   r   r   r   )r   r   kwargsr   r   r   s         r   test_parse_boolr)   %   s.    : F__Xd^6v6F&+r   c                     SnU nUR                  [        U5      5      n[        S/ SQ05      n[        R                  " X45        g )NzNumbers
17007000002000191
17007000002000191
17007000002000191
17007000002000191
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000194Numbers)
   ?u/r,   r,   r,      @u/r-   r-   r-   r-   l   Bu/r   r   s        r   &test_parse_integers_above_fp_precisionr.   G   sI    
D F__Xd^,F 	
H  &+r   sep z\s+c                 Z   SnU nUR                   S:X  aE  US:w  a?  Sn[        R                  " [        US9   UR	                  [        U5      S US9  S S S 5        g UR	                  [        U5      S US9n[        SS/S	S
//5      n[        R                  " XV5        g ! , (       d  f       g = f)Nz65248E10 11
55555E55 22
pyarrowr0   z6the 'pyarrow' engine does not support regex separatorsmatch)headerr/   g  jC   g!E(E VL   )	enginepytestraises
ValueErrorr   r   r   r   r   )r   r/   r   r   msgr   r   s          r   test_integer_overflow_bugr=   h   s     (DF}}	!cSjF]]:S1OOHTN4SOA 2__Xd^Dc_BF9b/Ir?;<H&+ 21s   B
B*c                     U nSnUR                  [        U5      5      n[        SS/S[        R                  /S.5      n[
        R                  " X45        g )Nz
A,B
0,0
0,r   )r   r   )r   r   r   npnanr   r   )r   r   r   r   r   s        r   test_int64_min_issuesrA   x   sG    FD__Xd^,F1vQK89H&+r   convc                    SnU nUc|  UR                   S:X  a.  [        R                  R                  SS9nUR	                  U5        UR                  [        U5      5      n[        / SQS/S9n[        R                  " Xg5        g SR                  / S	Q5      n[        n	UR                   S:X  a  [        n	S
n[        R                  " XS9   UR                  [        U5      SU0S9  S S S 5        g ! , (       d  f       g = f)NzID
00013007854817840016671868
00013007854817840016749251
00013007854817840016754630
00013007854817840016781876
00013007854817840017028824
00013007854817840017963235
00013007854817840018860166r2   zparses to float64)reason)00013007854817840016671868000130078548178400167492510001300785481784001675463000013007854817840016781876000130078548178400170288240001300785481784001796323500013007854817840018860166IDr   |)z)Python int too large to convert to C longzlong too big to convertzint too big to convertzBThe 'converters' option is not supported with the 'pyarrow' enginer3   )
converters)r8   r9   markxfailapplymarkerr   r   r   r   r   joinOverflowErrorr;   r:   )
r   rB   requestr   r   rO   r   r   r<   errs
             r   test_int64_overflowrV      s    D F| ==I%;;$$,?$@D%$0 F
 	f/
 hh
 ==I%CVC]]3*OOHTNd|OD +**s   	C..
C<valc                     U nUR                  [        [        U5      5      S S9n[        U/5      n[        R
                  " X45        g Nr5   r   r   strr   r   r   r   rW   r   r   r   s        r   test_int64_uint64_ranger^      s>     F__Xc#h/_=F#H&+r   c                     U nUR                  [        [        U5      5      S S9n[        [        U5      /5      n[        R
                  " X45        g rY   r[   r]   s        r   test_outside_int64_uint64_ranger`      sB     F__Xc#h/_=F#c($H&+r   exp_datal            c                     U nSR                  U5      n[        U5      nUR                  [        U5      S S9n[        R
                  " XT5        g )N
rZ   )rR   r   r   r   r   r   )r   ra   r   r   r   r   s         r   test_numeric_range_too_widere      sE    
 F99XD"H__Xd^D_9F&+r   c                     SnU nUR                  [        U5      S S9S   n[        SS/SS9n[        R                  " X45        g )Nz1,1;0;0;0;1;1;3844;3844;3844;1;1;1;1;1;1;0;0;1;1;0;0,,,4321583677327450765
5,1;0;0;0;1;1;843;843;843;1;1;1;1;1;1;0;0;1;1;0;0,64.0,;,4321113141090630389rZ      l   "ude_ l   :a6_ )name)r   r   r   r   assert_series_equal)r   sr   r   r   s        r   test_integer_precisionrk      sK    	PAF__Xa[_6q9F*,?@qIH6,r   )#__doc__ior   numpyr?   r9   pandasr   r   pandas._testing_testingr   rO   filterwarnings
pytestmarkusefixturesxfail_pyarrowskip_pyarrowr   parametrizer)   r.   r=   rA   int64uint64rV   iinfomaxminr^   r`   r\   re   rk    r   r   <module>r~      s      [[''C
 ''8{{&&~6
,  +ay5!*tQi83*M	
 31CUVUAJq	E1:ayIc
	
 +ay5!*tQi83*M	
 $"GeW=e}udm4sCjI	
'8,98,,B f., /,, $"))!<=1E >1Eh 	BHHRYY##RXXbhh%7%;%;RXXbhh=O=S=ST, , 	BHHRYY##a'"(();)?)?!)CD, , s2wE
&;c%j#b'=R%ST, U ,-r   