+
    yȇi                     Z    ^ RI t ^ RIHt ^ RIHt ^ RIHtHtHt ^ RI	H
t  ! R R4      tR# )    N)	to_offset)INVALID_FREQ_ERR_MSG)DatetimeIndex	Timestamp
date_rangec                     a  ] tR t^t o R t]P                  P                  R. RO4      R 4       tR t	R t
R tR tR t]P                  P                  R	R
.RRR
.3R
.RRR
.3R.RRR.3R.RRR.3R.RRR.3R.RRR.3R.RRR.3R.RRR.3R.RRR.3R.RRR.3R R!.4      R 4       t]P                  P                  RR"R#.4      ]P                  P                  R. R$O4      R 4       4       tRtV tR# )%TestDatetimeIndexRoundc                   \        R ^R7      pVP                  R4      p\        R^R7      p\        P                  ! W#4       VP	                  R4      P                  R4      pVP                  R4      p\        R^R7      P	                  R4      p\        P                  ! W#4       VP                  R4      p\        P                  ! W!4       R# )20130101 09:10:11periodsD20130101UTC
US/EasternsN)r   roundtmassert_index_equaltz_localize
tz_convert)selfdtiresultexpecteds   &   ځ/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexes/datetimes/methods/test_round.pytest_round_daily'TestDatetimeIndexRound.test_round_daily   s    ,a83j!4
f/ooe$//=3j!4@@N
f/3
f*    zfreq, error_msgc                   \        R ^R7      pVP                  R4      P                  R4      p\        P                  ! \
        VR7      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     R# ; i)r   r   r   r   matchN)r   r   r   pytestraises
ValueErrorr   )r   freq	error_msgr   s   &&& r   test_round_invalid)TestDatetimeIndexRound.test_round_invalid   sU     ,a8ooe$//=]]:Y77IIdO 8777s   A..A?	c                   Tp\        R ^RW2R7      pV^,          p\        \        RVR7      \        RVR7      \        RVR7      \        RVR7      \        RVR7      .4      P                  V4      pV^,          pVP	                  RR7      p\
        P                  ! W4       VP	                  RR7      V8X  g   Q h\        p	\        P                  ! \        V	R	7      ;_uu_ 4        VP	                  R
R7       RRR4       \        P                  ! \        V	R	7      ;_uu_ 4        VP	                  R
R7       RRR4       Rp	\        P                  ! \        V	R	7      ;_uu_ 4        VP	                  RR7       RRR4       \        P                  ! \        V	R	7      ;_uu_ 4        VP	                  RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)
2016-01-0130Minstartr   r&   tzunit2016-01-01 00:00:00r/   z2016-01-01 01:00:00z2016-01-01 02:00:00hr&   r!   fooN#<MonthEnd> is a non-fixed frequencyME)r   r   r   as_unitr   r   r   r   r#   r$   r%   )
r   tz_naive_fixturer0   r/   rngeltexpected_rngexpected_eltr   msgs
   &&&       r   
test_round!TestDatetimeIndexRound.test_round+   sx   |QWW!f$/B7/B7/B7/B7/B7
 '$- 	 $A$
f3yycy"l222"]]:S11II5I! 2]]:S11II5I! 2 4]]:S11II4I  2]]:S11II4I  21 2111 21111s0   %G$G%G'$G:G	G$	'G7	:H	c                (   Tp\        R .VR7      P                  R4      pVP                  R4      p\        R.VR7      P                  R4      p\        P                  ! WE4       R F(  p\        P                  ! W3P                  V4      4       K*  	  R# )z2016-10-17 12:00:00.0015r2   nsmsz2016-10-17 12:00:00.002000N)usrB   r   r8   r   r   r   )r   r9   r/   indexr   r   r&   s   &&     r   test_round2"TestDatetimeIndexRound.test_round2K   s{    9:rBJJ4PT" ">!?BGOOPTU
f/ D!!%T):; !r   c                    Tp\        R .VR7      P                  R4      pVP                  R4      p\        R.VR7      P                  R4      p\        P                  ! WE4       R# )z2016-10-17 12:00:00.00149r2   rB   rC   z2016-10-17 12:00:00.001000NrE   )r   r9   r/   rF   r   r   s   &&    r   test_round3"TestDatetimeIndexRound.test_round3V   sZ    :;CKKDQT" ">!?BGOOPTU
f/r   c                D   \        R .RR7      pVP                  R4      p\        R.RR7      p\        P                  ! W44       R p\        V.RR7      p\        P                  ! R4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)z2016-10-17 12:00:00.001501031zM8[ns])dtype10nsz2016-10-17 12:00:00.001501030F1010nsN)r   r   r   r   assert_produces_warning)r   r9   rF   r   r   tsr   s   &&     r   test_round4"TestDatetimeIndexRound.test_round4]   s}    >?xPV$ "A!B(S
f/,RD1''..IIh /...s   2BB	c                &   Tp\        R ^RVRR7      p\        \        RVR7      \        RVR7      \        RVR7      \        RVR7      \        R	VR7      .4      P                  R4      pVP	                  R
R7      p\
        P                  ! WT4       R# )r+   2MinrB   r-   r1   r2   z2016-01-01 00:02:00z2016-01-01 00:04:00z2016-01-01 00:06:00z2016-01-01 00:08:002minr4   N)r   r   r   r8   r   r   r   )r   r9   r/   r:   r<   r   s   &&    r   test_no_rounding_occurs.TestDatetimeIndexRound.test_no_rounding_occursh   s    |QVQUV$/B7/B7/B7/B7/B7
 '$- 	 '
f3r   z#test_input, rounder, freq, expectedz2117-01-01 00:00:45floor15sceilz2117-01-01 00:00:45.000000012rN   z2117-01-01 00:00:45.000000010z1823-01-01 00:00:01.000000012z1823-01-01 00:00:01.0000000201823-01-01 00:00:011sz2018-01-01 00:15:0015minz1823-01-01 03:00:003hc                    \        \        V4      4      p\        WR4      pV! V4      p\        \        V4      4      pVP                  V4      '       g   Q hR # )N)r   listgetattrequals)r   
test_inputrounderr&   r   dtfuncr   s   &&&&&   r   test_ceil_floor_edge+TestDatetimeIndexRound.test_ceil_floor_edgez   sJ    L 4
+,r#d h0v&&&&r   zstart, index_freq, periods
round_freqc                   \        WVR R7      p\        V4      P                  pVP                  V4      pVP                  VP                  ,
          pVP                  V,          p	V	^ 8H  P                  4       '       g   Q RV R24       h^ V8*  P                  4       '       d   W8  P                  4       '       g   Q R4       hVP                  V4      pVP                  VP                  ,
          pVP                  V,          p	V	^ 8H  P                  4       '       g   Q RV R24       h^ V8*  P                  4       '       d   W8  P                  4       '       g   Q R4       hVP                  V4      p\        VP                  VP                  ,
          4      pVP                  V,          p	V	^ 8H  P                  4       '       g   Q RV R24       hW^,          8*  P                  4       '       g   Q R4       hV^,          ^ 8X  dD   VP                  W^,          8H  ,          ^,          ^ 8H  P                  4       '       g   Q R	4       hR
# R
# )rB   )r.   r&   r   r0   zfloor not a z	 multiplezfloor errorzceil not a z
ceil errorzround not a zround errorzround half to even errorN)	r   r   nanosrY   asi8allr[   r   abs)
r   r.   
index_freqr   rj   rf   r0   r   diffmods
   &&&&&     r   test_round_int64'TestDatetimeIndexRound.test_round_int64   s   : egDQ$** *%ww$kkD q~~E<
|9!EET	  dk%6%6%8%8G-G8 ${{RWW$kkD q~~D;zl)!DDT	  dk%6%6%8%8F,F8 *%6;;()kkD q~~E<
|9!EE	!&&((7-7(!8q=KK	 12Q6!;@@BB *B r    N))YEz,<YearEnd: month=12> is a non-fixed frequency)r7   r6   )foobarzInvalid frequency: foobar)NaTr\   rY   r]   rx   )rx   r[   r]   rx   )z
2018-01-0112h   )z2018-01-01 0:0:0.1249991nsi  )2ns3ns4ns5ns6ns7ns250ns500ns750ns1us19us250us500us750usr]   2s3srz   1D)__name__
__module____qualname____firstlineno__r   r#   markparametrizer(   r?   rG   rJ   rR   rW   rh   rs   __static_attributes____classdictcell__)__classdict__s   @r   r	   r	      s    + [[	
!@	<0	 4$ [[-#$gu7L6MN#$fe6K5LM0101	 1101	 $$gt6K5LM#$fd5J4KL#$fg8M7NO#$gw9N8OP#$fd5J4KL#$gt6K5LM7!	
$J'K$J' [[$	"$LM [[	
01	8r   r	   )r#   pandas._libs.tslibsr   pandas._libs.tslibs.offsetsr   pandasr   r   r   pandas._testing_testingr   r	   ru   r   r   <module>r      s)     ) < 
 O Or   