+
    yȇi`                        ^ RI Ht ^ RIHt ^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHtHtHtHt ^ RIHt  ! R R	4      t ! R
 R4      tR tR tR tR tR tR tR t]P@                  PC                  R]"! RRRRRRRRRRRRR R!/PG                  4       4      4      ]P@                  PC                  R"]PH                  ]PJ                  ]PL                  ]PN                  ]PP                  ]PR                  .4      R# 4       4       t*]P@                  PC                  R$. ReO4      R% 4       t+R& t,]P@                  PC                  R'. RfO4      R( 4       t-]P@                  PC                  R'. RgO4      R) 4       t.]P@                  PC                  R*R+]! ^^2^^
^
^R,7      3R-]! Rh^2^^
^
^R,7      3R.]! ^^^^R/7      3R0]! ^{R17      3R2]! ^
R37      3R4]! ^R57      3R6]! ^R77      3R8]! ^^^=^=R/7      3R9]! ^R:7      3R;]! ^ R:7      3R<]! ^^ R=7      3R>]! ^R?7      3R@]! ^^RA7      3RB]! ^R?7      3RC]! RDR:7      3RE]! ^R?7      3RF]! Rh^RG7      3RH]! RhRiRG7      3RI]! ^RiRG7      3.4      RJ 4       t/]P@                  PC                  RK. RjO4      RL 4       t0]P@                  PC                  RM]! ^dR17      RN3]! ^^^^^^^^RO7      RP3]! ^R37      ]! ^R17      ,           RQ3]! ^R37      ]! ^R17      ,
          RR3]! ^R37      ^]! RkR17      ,          ,           RS3.4      RT 4       t1RU t2RV t3RW t4]P@                  Pk                  RX4      ]P@                  PC                  RY]RZR3]RZR3]. RlOR3.4      R[ 4       4       t6]P@                  PC                  R\Rm U Uu. uF%  p ]! R]V R^7       F  pR_Po                  V4      NK  	  K'  	  upp 4      R` 4       t8Ra t9Rb t:Rc t;Rd t<R# u upp i )n    )	timedelta)productN)OutOfBoundsTimedelta)NpyDatetimeUnit)Pandas4Warning)IndexNaT	TimedeltaTimedeltaIndexoffsetsto_timedeltac                   ,   a  ] tR t^t o R tR tRtV tR# )$TestTimedeltaConstructorKeywordBasedc                D    \        R R7      pVP                  R8X  g   Q hR# )  nanosecondsnsNr
   unitselftds   & /Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/scalar/timedelta/test_constructors.pytest_nanosecond_keyword<TestTimedeltaConstructorKeywordBased.test_nanosecond_keyword   s    4(ww$    c                j    \        R R7      pVP                  R8X  g   Q hV\        RR7      8X  g   Q hR# )g      ?microsecondsr   i  r   Nr   r   s   & r   test_noninteger_microsecondsATestTimedeltaConstructorKeywordBased.test_noninteger_microseconds   s/    C(ww$Y40000r    N)__name__
__module____qualname____firstlineno__r   r!   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s     
1 1r   r   c            	         a ] tR t^%t oR t]P                  P                  R. RO4      R 4       t]P                  P                  R. RO4      R	 4       t	]P                  P                  R
R.R U u. uF  q R3NK  	  up ,           R U u. uF  p V R3NK	  	  up ,           R U u. uF  p V R3NK	  	  up ,           R U u. uF  p V R3NK	  	  up ,           R U u. uF  p V R3NK	  	  up ,           R U u. uF  p V R3NK	  	  up ,           4      ]P                  P                  R]
P                  ]].4      R 4       4       t]P                  P                  R. RO4      R 4       tR tR tRtVtR# u up i u up i u up i u up i u up i u up i )#TestTimedeltaConstructorUnitKeywordc                *   R FC  p\        ^VR7      pVP                  V8X  g   Q h\        ^VR7      pVP                  V8X  d   KC  Q h	  R FC  p\        ^VR7      pVP                  R 8X  g   Q h\        ^VR7      pVP                  R 8X  d   KC  Q h	  R# )sr   N)r.   msusr   )WDhmr
   r   r   )r   r   r   s   &  r   test_result_unit4TestTimedeltaConstructorUnitKeyword.test_result_unit&   s    +D14(B77d?"?ad+B77d?"? , )D14(B77c>!>ad+B77c>!> )r   r   c                   R p\         P                  ! \        VR7      ;_uu_ 4        \        ^
V4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        ^
V4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        ^^.V4       RRR4       R#   + '       g   i     L; i  + '       g   i     L`; i  + '       g   i     R# ; i)z/Units 'M', 'Y', and 'y' are no longer supportedmatchNpytestraises
ValueErrorr
   r   r   r   msgs   && r   test_unit_m_y_raises8TestTimedeltaConstructorUnitKeyword.test_unit_m_y_raises7   s    ?]]:S11b$ 2 ]]:S11T" 2 ]]:S11!Q& 21 21 21 211s#   B2 CC2C	C	C)	zunit,unit_deprr3   r.   r0   r1   c                    R V R2p\        ^VR7      p\        P                  ! \        VR7      ;_uu_ 4        \        ^VR7      pRRR4       \        P                  ! XV4       R#   + '       g   i     L); i)'z8' is deprecated and will be removed in a future version.r/   r:   N)r
   tmassert_produces_warningr   assert_equal)r   r   	unit_deprrA   expectedresults   &&&   r   test_unit_deprecated8TestTimedeltaConstructorUnitKeyword.test_unit_deprecatedD   s\     )TUQT*''cBBqy1F C
) CBs   A''A7	zunit, np_unitr5   r   wrapperc           	        VR
9  d   TMRp\        \        P                  ! ^4      P                  4        Uu. uF  p\        P                  ! WR4      NK  	  upRV R2R7      p\        V! \        ^4      4      VR7      p\        P                  ! Wv4       \        P                  ! ^4       Uu. uF  q V 2NK
  	  p	pVR8w  d   RMRp\        V! V	4      4      p\        P                  ! WvP                  V4      4       \        V! V	4      4      p\        P                  ! WvP                  V4      4       \        \        P                  ! ^V4      4      P                  V4      p\        ^VR7      pWv8X  g   Q h\        ^VR7      pWv8X  g   Q h\        RV 24      pWv8X  g   Q h\        RV 24      pWv8X  g   Q hR	# u upi u upi )r2   r.   zm8[])dtyper/   r   r1   2N)r2   r3   r5   )r   nparangetolisttimedelta64r   rangerF   assert_index_equalas_unitr
   )
r   r   np_unitrN   exp_unitirJ   rK   xstr_reprs
   &&&&      r   test_unit_parser4TestTimedeltaConstructorUnitKeyword.test_unit_parserY   s   V &_<7#!1311D1D1FG1FAR^^A'1FGz#

 geAh/d;
f/*,))A,7,Qc$L,7"d?4gh/0
f&6&6x&@Agh/0
f&6&6x&@A R^^Aw78@@Jad+!!!14(!!!$j)!!!Qtf:&!!!1 H 8s   F;-G c                   R V 2p\         P                  ! \        VR7      ;_uu_ 4        \        ^VR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        ^
V4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        ^^.V4       RRR4       R#   + '       g   i     L; i  + '       g   i     L`; i  + '       g   i     R# ; i)zinvalid unit abbreviation: r:   r/   Nr<   r@   s   && r   test_unit_T_L_N_U_raises<TestTimedeltaConstructorUnitKeyword.test_unit_T_L_N_U_raises   s    +D62]]:S11ad# 2 ]]:S11T" 2 ]]:S11!Q& 21 21 21 211s#   B6$C	C6C		C	C-	c                    \        R RR7      pVP                  R8X  g   Q hV\        ^-RR7      8X  g   Q h\        R RR7      pVP                  R8X  g   Q hV\        ^-RR7      8X  g   Q hR# )g     F@r.   r/   Nr6   r   s   & r   test_unit_round_float9TestTimedeltaConstructorUnitKeyword.test_unit_round_float   sf     t#&ww#~~Yr,,,,$S)ww#~~Yr,,,,r   c                    \        R RR7      pVP                  R8X  g   Q hV\        RRR7      8X  g   Q h\        R RR7      pVP                  R8X  g   Q hV\        RRR7      8X  g   Q hR# )g     F@r.   r/   r   i  r0   Nr6   r   s   & r   test_unit_non_round_float=TestTimedeltaConstructorUnitKeyword.test_unit_non_round_float   sd    t#&ww$YvD1111$S)ww$YvD1111r   r#   N)YyM))r2   w)r3   d)minMIN)r.   S)r4   H)r0   MS)r1   US)r2   r2   )r3   daysdayDaysDay)r5   minutero   minutesMinuteMinMinutes)r.   secondssecsecondSecondsSecSecond)	r0   millisecondsmillisecondmillimillisMillisecondsMillisecondMilliMillis)	r1   r    microsecondmicromicrosMicrosecondsMicrosecondMicroMicros)	r   r   
nanosecondnanonanosNanoseconds
NanosecondNanoNanos)TtLlUuNn)r$   r%   r&   r'   r7   r=   markparametrizerB   rL   rS   arraylistr   r_   rb   re   rh   r(   r)   )valuer*   s   0@r   r,   r,   %   s    "" [[V_5
' 6
' [[	
** [[	%H
I%HE3<%H
I	J
 CL
	
 
 CL
	
8


 DM

5'	
T


 DM

Q5	
p


 DM

mC	
FN [[Y4(?@" AOFP"> [[V%MN	' O	'	-2 2w J




s$   1E)	E."E3;E8E=-Fr,   c                  @   R p \         P                  ! \        V R7      ;_uu_ 4        \        RR7       RRR4       Rp \         P                  ! \        V R7      ;_uu_ 4        \        RR7       RRR4       R#   + '       g   i     LM; i  + '       g   i     R# ; i)zKseconds=86400000000000000000, milliseconds=0, microseconds=0, nanoseconds=0r:   ru   NzKseconds=60000000000000000000, milliseconds=0, microseconds=0, nanoseconds=0rz   i@B  ʚ;r=   r>   r   r
   rA   s    r   #test_construct_from_kwargs_overflowr      sb    
WC	+3	7	7u 
8
WC	+3	7	7%  
8	7 
8	7 
8	7	7s   A9"B9B		B	c                  @   R p \         P                  ! \        V R7      ;_uu_ 4        \        RRR7       RRR4       \         P                  ! \        V R7      ;_uu_ 4        \        RRR7       RRR4       R#   + '       g   i     LL; i  + '       g   i     R# ; i)z1000000000000000000 weeksr:        NZor2   r/   Ng NgmCr   r   s    r   'test_construct_with_weeks_unit_overflowr      se    
%C	+3	7	7%C0 
8 
+3	7	7'c2 
8	7 
8	7 
8	7	7s   A9!B9B		B	c            	         \         P                  ! R R4      p Rp\        P                  ! \        RR7      ;_uu_ 4        \
        P                  ! \        VR7      ;_uu_ 4        \        V RR7       RRR4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \
        P                  ! \        VR7      ;_uu_ 4        \        V RR7       RRR4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lx; i  + '       g   i     L; i  + '       g   i     R# ; i)	l    J.mr4   z;The 'unit' keyword is only used when the Timedelta input isz123456789000000000 hoursr:   psr/   Nr   )	rS   rV   r=   r>   r   rF   rG   UserWarningr
   )objrA   s     r   "test_construct_from_td64_with_unitr      s     ..+S
1C
GC	+3M	N	N''3??c% @ 
O 
+3M	N	N''3??c% @ 
O 
+3M	N	N# 
O	N @? 
O	N
 @? 
O	N 
O	N	NsS   %D5#D"	1D5%%E
E	EE."D2-D55E	EEE+	.E?	c                  |   \         P                  ! R R4      p \        V 4      pVP                  V P	                  R4      8X  g   Q hVP
                  \        P                  P                  8X  g   Q h\         P                  ! RR4      p\        V4      pVP
                  \        P                  P                  8X  g   Q hW28X  g   Q hVP                  R8X  g   Q h\         P                  ! RR4      p\        V4      pVP                  4       R8X  g   Q hVP
                  \        P                  P                  8X  g   Q hR# )	i90  r0   i8i  r3   r   r1   l    J)N)rS   rV   r
   _valueview_cresor   	NPY_FR_msr   NPY_FR_sru   total_seconds	NPY_FR_us)r   r   obj2td2obj3td3s         r    test_from_td64_retain_resolutionr   	  s    
..
%C	3B99&&&991177777 >>$$D
D/C::1177777;;88t >>-t4D
D/C-///::2288888r   c                      \        ^^R7      p \        V 4      pVP                  4       V 8X  g   Q hVP                  \        P
                  P                  8X  g   Q hR# )   )ru   rz   N)r   r
   to_pytimedeltar   r   r   r   )r   rK   s     r   test_from_pytimedelta_us_resor     sL    	1	%Br]F  "b(((==O55;;;;;r   c                  8   \         P                  ! 4       p \        V 4      P                  \        P
                  P                  8X  g   Q h\         P                  ! 4       p \        V 4      P                  \        P                  P                  8X  g   Q h\         P                  ! 4       p \        V 4      P                  \        P                  P                  8X  g   Q h\         P                  ! 4       p \        V 4      P                  \        P                  P                  8X  g   Q h\         P                  ! 4       p \        V 4      P                  \        P                  P                  8X  g   Q h\         P                  ! 4       p \        V 4      P                  \        P                  P                  8X  g   Q h\         P                  ! 4       p R p\         P"                  ! \$        VR7      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)zRValue must be Timedelta, string, integer, float, timedelta or convertible, not Dayr:   N)r   r   r
   r   r   	NPY_FR_nsr   r   r   r   r   r   r   r{   Hourrx   r=   r>   r?   )tickrA   s     r   test_from_tick_resor   '  s^   <<>DT?!!_%>%>%D%DDDD==?DT?!!_%>%>%D%DDDD==?DT?!!_%>%>%D%DDDD>>DT?!!_%=%=%C%CCCC >>DT?!!_%=%=%C%CCCC<<>DT?!!_%=%=%C%CCCC;;=D	"  
z	-	-$ 
.	-	-	-s   2HH	c            	         \         P                  ! ^
R4      P                  R4      P                  R4      p \	        ^
RR7      P
                  V RO,          8X  g   Q h\	        RRR7      P
                  V RO,          8X  g   Q h\	        R4      P
                  V R,          8X  g   Q h\	        ^
R7      P
                  V R,          8X  g   Q h\	        RR7      P
                  V R,          8X  g   Q hV \         P                  ! ^
R	4      P                  R4      P                  R4      ,          p \	        R
4      P
                  V R,          8X  g   Q h\	        ^
^
R7      P
                  V R,          8X  g   Q h\	        ^
RPR7      P
                  V R,          8X  g   Q h\	        ^
RQR7      P
                  V R,          8X  g   Q h\	        R4      P
                  R8X  g   Q hR\        \	        R4      4      9   g   Q h\	        R4      P
                  R8X  g   Q hR\        \	        R4      4      9   g   Q h\	        R4      \        ^ R7      8X  g   Q h\	        R4      \        ^ R7      8X  g   Q h\	        R4      \        ^R7      ) 8X  g   Q h\	        R4      \        ^R7      ) 8X  g   Q h\	        R4      \        ^R7      8X  g   Q h\	        R4      \        ^R7      8X  g   Q h\	        R4      \        ^R7      8X  g   Q h\	        R4      \        ^R7      8X  g   Q h\	        R4      \        ^R7      ) 8X  g   Q h\	        R4      \        ^R7      8X  g   Q h\	        R4      \        ^ZR7      8X  g   Q h\	        R 4      \        ^R7      8X  g   Q h\	        R!4      \        ^R7      8X  g   Q h\	        R"4      \        ^R7      8X  g   Q h\	        R#4      \        ^R7      8X  g   Q h\	        R$4      \        ^R7      8X  g   Q h\	        R%4      \        ^R&7      8X  g   Q h\	        R'4      \        ^R&7      8X  g   Q h\	        R(4      \        ^R&7      8X  g   Q h\	        R)4      \        ^R*7      8X  g   Q h\	        R+4      \        ^R*7      8X  g   Q h\	        R,4      \        ^R*7      8X  g   Q h\	        R-4      \        ^R*7      8X  g   Q h\	        R.4      \	        R/4      8X  g   Q h\	        R04      \	        R14      8X  g   Q h\	        R24      \	        R14      8X  g   Q h\	        R34      \	        R14      8X  g   Q h\	        R44      \        ^
^R57      8X  g   Q h\	        R64      \        ^
^R57      8X  g   Q h\	        R74      \        ^
^^^R87      8X  g   Q h\	        R94      \        ^
^^^R87      ) 8X  g   Q h\	        R94      \        ^
^^^R87      ) 8X  g   Q h\	        R:4      \        ^
^^^^R;7      ) 8X  g   Q h\	        R<4      \        ^
^^^^R;7      ) 8X  g   Q hR=p\        P                  ! \        VR>7      ;_uu_ 4        \	        R?4       R@R@R@4       \        P                  ! \        VR>7      ;_uu_ 4        \	        RA4       R@R@R@4       RBp\        P                  ! \        VR>7      ;_uu_ 4        \	        RC4       R@R@R@4       RDp\        P                  ! \        VR>7      ;_uu_ 4        \	        4        R@R@R@4       REp\        P                  ! \        VR>7      ;_uu_ 4        \	        RF4       R@R@R@4       RGp\        P                  ! \        VR>7      ;_uu_ 4        \	        ^
RH7       R@R@R@4       \         P                  ! ^
R	4      P                  R4      P                  R4      \         P                  ! RIRJ4      P                  R4      P                  R4      ,           p \	        RKR	R7      P
                  V 8X  g   Q h\        \        P                  ! ^4      4      \	        ^R7      8X  g   Q h\	        \        P                  ! ^4      4      \	        ^R7      8X  g   Q h\	        \        P                  ! ^4      4      \	        ^R7      8X  g   Q h\	        RL4      p \	        RL4      pW 8X  g   Q h\        \        P                  ! ^4      4      \	        RM4      8X  g   Q hREp\        P                  ! \        VR>7      ;_uu_ 4        \	        RN4       R@R@R@4       R@#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELh; i  + '       g   i     ELB; i  + '       g   i     EL; i  + '       g   i     R@# ; i)R
   r3   m8[ns]r   r/   g      $@z10 daysr   r   r.   z10 days 00:00:10ru   r~   )ru   r   )ru   r    l   >P- z0 days 22:58:59.999850l   @B]? z1 days 10:11:12.001z0:00:00)hoursz00:00:00z-1:00:00z	-01:00:00z1 hz1 hourz1 hrz1 hoursz-1 hoursz1 mr   z1.5 mr~   1 minutez	1 minutesz1 sz1 secondz	1 secondsz1 msr   z1 milliz1 millisecondz1 usr   u   1 µsz1 microsz1 microsecondz1.5 microsecondz00:00:00.000001500z1 nsz00:00:00.000000001z1 nanoz1 nanosecondz10 days 1 hourru   r   z10 days 1 hz10 days 1 h 1m 1sru   r   rz   r~   z-10 days 1 h 1m 1sz-10 days 1 h 1m 1s 3us)ru   r   rz   r~   r    z-10 days 1 h 1.5m 1s 3us'only leading negative signs are allowedr:   z-10 days -1 h 1.5m 1s 3usNz10 days -1 h 1.5m 1s 3uszno units specifiedz3.1415zcannot construct a Timedeltazunit abbreviation w/o a numberfoozMcannot construct a Timedelta from the passed arguments, allowed keywords are )rv   i  r0   g      %@1hz0 days, 02:00:00zfoo barr   i'  i )rS   rV   astyper   r
   r   strr   r=   r>   r?   r   r   r   r   )rJ   rA   rK   s      r   test_constructionr   E  s   ~~b#&--h7<<TBHRc"))X->>>>T$++x5/@@@@Y&&(d*::::"$$D(8888$&&(d*::::r3'..x8==dCCH'(//8t3CCCC"b)00H4DDDD"95<<D@PPPP"+;<CCxSWGWWWW ^$++~===#s9^+D'EEEE_%,,??? C	/(B$CCCC Y91#5555Z IA$6666Z YQ%7$7777[!ia&8%8888 Uyq1111X)!"4444V	 2222Y91#5555Z YQ%7$7777Uy3333W2!6666Z Ia$8888[!Yq%9999Uy3333Z Ia$8888[!Yq%9999V	q 9999Y9!#<<<<_%)BBBBV	q 9999W!::::Z I1$====_%)BBBB&'95I+JJJJV	*> ????X),@"AAAA^$	2F(GGGG %&)1*EEEE]#yb'BBBB()Yq!Q.    )*yq!Q0 /    )*yq!Q0 /    -.9q!QQ4 3    /0Yq!Ra6 5    4C	z	-	--. 
. 
z	-	-,- 
. C	z	-	-( 
. )C	z	-	- 
. +C	z	-	-% 
. 	X  
z	-	-b 
. ~~b#&--h7<<TBR^^TFfXttDz"H T$++x777 Q(IA,>>>>W\\!_%);;;;W^^A&'9Q+???? Ht_FQ(I6H,IIII
*C	z	-	-) 
.	-[ 
.	-	- 
.	-	-
 
.	-	-
 
.	-	- 
.	-	- 
.	-	-* 
.	-	-sT   c5d	dd1 e:ee-5d		d	d.	1e	e	e*	-e>	itemru   r3   r~   r.   r    r1   r   r0   rz   r5   r   r4   weeksr2   npdtypec                     Vw  r#\         P                  ! ^V4      P                  R4      P                  R4      p\	        R/ W ! ^4      /B P
                  V8X  g   Q hR# )   zm8[us]r   Nr#   )rS   rV   r   r   r
   r   )r   r   pykwargnpkwargrJ   s   &&   r   #test_td_construction_with_np_dtypesr     sW    & G~~a)00:??EH-,-44@@@r   valc                    \        V 4      p\        VP                  4      V8X  g   Q h\        \        V4      4      V8X  g   Q h\        VP                  R R7      4      V8X  g   Q h\        VP                  4       4      V8X  g   Q hR# )all)formatN)r
   r   r   
_repr_base)r   r   s   & r   test_td_from_repr_roundtripr     sr    $ 
3BRXX"$$$SW###R]]%]01R777R]]_%+++r   c                     \        R 4      P                  R4      P                  R,          p Rp\        P                  ! \
        VR7      ;_uu_ 4        \        V 4       RRR4       \        R
RR7      pVP                  R8X  g   Q h\        \        RR	7      4      pVP                  \        P                  P                  8X  g   Q hVP                  R8X  g   Q hR#   + '       g   i     L; i)1dayr   i3zCCannot cast 1742682816000000000000 from ns to 'ns' without overflowr:   Nr3   r/   r.   r   i" i )r
   rY   r   r=   r>   r   r   r   r   r   r   r   ru   )r   rA   r   s      r   test_overflow_on_constructionr     s    f%%d+22X=E
OC	+3	7	7% 
8
 
93	'B77c>> 
9*-	.B99117777777j    
8	7s   CC+	z	val, unitc                 F   \         P                  ! W4      pVP                  R 4      P                  R4      ^ 8  g   Q h\	        V4      pVR8w  d   VP
                  V8X  g   Q hVP
                  P                  R8X  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       \	        V^,
          4      V^,
          8X  g   Q hVR	,          pVP                  R 4      P                  R4      ^ 8  g   Q h\	        V4      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       \	        V^,           4      V^,           8X  g   Q hR#   + '       g   i     L; i  + '       g   i     LE; i)
r   r   rl   zm8[s]z:Cannot cast 1067\d\d days .* to unit='ns' without overflowr:   r   Nz;Cannot cast -1067\d\d days .* to unit='ns' without overflow)rS   rV   r   r   r
   asm8rQ   r=   r>   r   rY   )r   r   td64r   rA   r   s   &&    r   &test_construction_out_of_bounds_td64nsr     s<    >>#$D;;x %%d+a///	4Bs{ ww$77==G###
GC	+3	7	7


4 
8 TAX$(***BJD;;x %%d+a///
D/C
HC	+3	7	7D 
8 TAX$(*** 
8	7 
8	7s   &E=F=F	F 	c                    \         P                  ! W4      p\        P                  ! \        \        V4      R 7      ;_uu_ 4        \        V4       RRR4       \        VR,
          4      VR,
          8X  g   Q hR#   + '       g   i     L2; i)r:   Nr   )rS   rV   r=   r>   r   r   r
   )r   r   r   s   && r   %test_construction_out_of_bounds_td64sr   0  sZ     >>#$D	+3t9	=	=$ 
> TE\"dUl222	 
>	=s   A::B
	zfmt,expzP6DT0H50M3.010010012S)ru   rz   r~   r   r    r   zP-6DT0H50M3.010010012SP4DT12H30M5Sr   zP0DT0H0M0.000000123Sr   zP0DT0H0M0.00001Sr   zP0DT0H0M0.001Sr   
P0DT0H1M0Sr   P1DT25H61M61SPT1Sr   PT0SP1WT0Sr   P1Dr   P1DT1Hr   P1WPT300Si,  P1DT0H0M00000000000SzPT-6H3M)r   rz   z-PT6H3Mz	-PT-6H+3Mc                 *    \        V 4      V8X  g   Q hR # Nr
   )fmtexps   &&r   test_iso_constructorr  B  s    Z S>S   r   r  c                     R V  2p\         P                  ! \        VR7      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)z#Invalid ISO 8601 Duration format - r:   Nr=   r>   r?   r
   )r  rA   s   & r   test_iso_constructor_raisesr  r  s7     0u
5C	z	-	-# 
.	-	-	-s   A  A	zconstructed_td, conversion100ns)ru   r   rz   r   r~   r   r    r   l   )D^_ 1us1ns999ns990nsc                 *    V \        V4      8X  g   Q hR # r  r  )constructed_td
conversions   &&r   "test_td_constructor_on_nanosecondsr    s    0 Yz2222r   c                      R p \         P                  ! \        V R7      ;_uu_ 4        \        RR7       RRR4       R#   + '       g   i     R# ; i)z1Invalid type <class 'str'>. Must be int or float.r:   abcr   N)r=   r>   	TypeErrorr
   r   s    r   test_td_constructor_value_errorr    s/    
=C	y	,	,e$ 
-	,	,	,s	   >A	c                  j    \        \        P                  ! ^R4      4      p \        V 4      pWJ g   Q hR# )r   r.   N)r
   rS   rV   )rJ   rK   s     r   #test_timedelta_constructor_identityr    s-    3/0Hx Fr   c                      \        ^R7      p Rp\        P                  ! \        VR7      ;_uu_ 4        \        V ^R7       RRR4       R#   + '       g   i     R# ; i)r   r   zRCannot pass both a Timedelta input and timedelta keyword arguments, got \['days'\]r:   N)r
   r=   r>   r?   )r   rA   s     r   (test_timedelta_pass_td_and_kwargs_raisesr    sB    		B	  
z	-	-"1 
.	-	-	-s   AA	zKignore:The 'unit' keyword is only used when the Timedelta input:UserWarningzconstructor, value, unit10sc                     \         P                  ! \        R R7      ;_uu_ 4        V ! WR7       RRR4       R#   + '       g   i     R# ; i)zunit must not be specifiedr:   r/   N)r=   r>   r?   )constructorr   r   s   &&&r   test_string_with_unitr    s.     
z)E	F	FE% 
G	F	F	Fs	   
9A
	r   z+-, )repeat c                     V R 8w  d   RMRp\         P                  ! \        VR7      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)z--zsymbols w/o a numberr   r:   Nr  )r   rA   s   & r   test_string_without_numbersr     sB     D= 	6 
 
z	-	-% 
.	-	-	-s   AA	c                  ^    \         P                  ! R R4      p \        V 4      \        J g   Q hR# )r	   r4   N)rS   rV   r
   r	   )nats    r   test_timedelta_new_npnatr#    s$    
..
$CS>S   r   c                  Z     ! R  R\         4      p V ! R4      p\        W4      '       g   Q hR# )c                       ] tR tRtRtR# )2test_subclass_respected.<locals>.MyCustomTimedeltai  r#   N)r$   r%   r&   r'   r(   r#   r   r   MyCustomTimedeltar&    s    r   r'  r   N)r
   
isinstance)r'  r   s     r   test_subclass_respectedr)    s+    I  
:	&Bb,,,,r   c                     \        ^
RR7      P                  R4      P                  p V R8X  g   Q hRp\        RR4      P                  R4      R,          p\        P                  ! \
        VR7      ;_uu_ 4        VP                   RRR4       VP                  P                  R	4      p V R
8X  g   Q hR#   + '       g   i     L6; i)r   r3   r/   r.   l     ,Z6G zCannot convert Timedelta to nanoseconds without overflow. Use `.asm8.view\('i8'\)` to cast represent Timedelta in its own unit \(here, s\).$r   r:   Nr   l    `;P )r
   rY   r   r=   r>   OverflowErrorr   r   )rK   rA   r   s      r   test_non_nano_valuer,    s    r$,,S177F_$$$	" 
 
5#		&	&s	+e	3B	}C	0	0
 
1 WW\\$F[   	 
1	0s   8B33C	c                  2   \        R 4      p V P                  R8X  g   Q h\        R4      p V P                  R8X  g   Q h\        R4      p V P                  R8X  g   Q h\        R4      p V P                  R8X  g   Q h\        R4      p V P                  R8X  g   Q hR# )z1 Dayr1   z1 Day 2 hours 3 minutes 4 nsr   z1 Day 2:03:04.012345z1 Day 2:03:04.012345000z1 Day 2:03:04.0123450Nr   )r   s    r   test_parsed_unitr.    s    	7	B77d??	1	2B77d??	)	*B77d??	,	-B77d?? 
*	+B77d??r   )1sz-1s1usz-1usz1 dayz-1 dayz-23:59:59.999999z-1 days +23:59:59.999999z-1ns1nsz-23:59:59.999999999))i;  r2   )i  r3   )i ' r4   )i)	r5   )l   }K r.   ))l    ~L{7r2   )l     F\ r3   )l     hH r4   )l    r5   i)PPPPPPPPPPPPPDTHMSP0DT999H999M999SzP1DT0H0M0.0000000000000SzP1DT0H0M0.SPz-P)1      )r   r9  )=datetimer   	itertoolsr   numpyrS   r=   pandas._libs.tslibsr   pandas._libs.tslibs.dtypesr   pandas.errorsr   pandasr   r	   r
   r   r   r   pandas._testing_testingrF   r   r,   r   r   r   r   r   r   r   r   r   r   itemsint64int32int16float64float32float16r   r   r   r   r   r  r  r  r  r  r  filterwarningsr  joinr   r#  r)  r,  r.  )
repetitionelementss   00r   <module>rO     s       4 6 (  1 1z2 z2z!3&9,<<yx 
CsDDsSS	
 %'
 "((BHHbjj"**bjjQA"A 	 ,! ,!$ 	+	+B 33  $
	
 %
	
 
RKL	s!;<	YB78	9!45	y+,	)"b"MN	1%&	1%&	9!Q/0		q!"	9!1-.		q!"	9S)*	!23	IB23	IB34	ia45O(+X!Y+X! 	  	s	#W-	 	
 
	"Y1%=	=xH		"Y1%=	=wG		"Qr)B%B	BGL#,3-,3
% Q 	E4 	ud#	{C(&&
  ! Jz:H 	: 	 !-!(is   +O