
    OwgU	                     H    d Z ddlZddlZddlmZmZ ddlmZ	  G d d      Z
y)z[
Tests for DataFrame cumulative operations

See also
--------
tests.series.test_cumulative
    N)	DataFrameSeriesc                   f    e Zd Zd Zd Zej                  j                  dg d      d        Zd Z	y)TestDataFrameCumulativeOpsc                 t   t        dt        j                  d      it        j                  d            }|j                          |j	                          |j                          t        t        j                  d      j                  dd      t        d      t        d            }|j                          y )NA   )index      )r
   columns)r   nparangecummaxcummincumsumreshaperange)selfdfdms      Y/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/frame/test_cumulative.pytest_cumulative_ops_smokez4TestDataFrameCumulativeOps.test_cumulative_ops_smoke   ss    RYYr]+299R=A
		
		
		ryy},,Q2%(ERSHU
		    c                    t         j                  |j                  dddf<   t         j                  |j                  dddf<   t         j                  |j                  dd df<   |j                  d      j	                  t
              }|j                  d       |j                  d       |j                  d      j	                  t         j                        }|j                  d       |j                  d       y )Nr   
   r            )r   nanilocfillnaastypeintcumprodint32)r   datetime_framer   s      r   test_cumprod_smokez-TestDataFrameCumulativeOps.test_cumprod_smoke"   s    ')vvAbD!G$(*BrE1H%&(ffBCF# ""1%,,S1


1


1 ""1%,,RXX6


1


1r   method)r   r%   r   r   c                 D   t         j                  |j                  dddf<   t         j                  |j                  dddf<   t         j                  |j                  dd df<    t        ||             }|j	                  t        t
        |            }t        j                  ||        t        ||      d      }|j	                  t        t
        |      d      }t        j                  ||       t        j                  |      t        j                  |      k(  sJ y )Nr   r   r   r   r   r   )axis)	r   r    r!   getattrapplyr   tmassert_frame_equalshape)r   r'   r)   resultexpecteds        r   &test_cumulative_ops_match_series_applyzATestDataFrameCumulativeOps.test_cumulative_ops_match_series_apply1   s    ')vvAbD!G$(*BrE1H%&(ffBCF# 102!''(?@
fh/ 10a8!''(?a'H
fh/ xx288N#;;;;r   c                 &   t        g dg dg dd      }|j                         }t        t        g dt        j                        t        g dt        j
                        |d   j                         d      }t        j                  ||       y )N)r   r      )r   r   g      @)TFF)r   BC)r   r5      )dtyper7   )r   r   r   r   int64float64r.   r/   )r   r   r1   r2   s       r   test_cumsum_preserve_dtypesz6TestDataFrameCumulativeOps.test_cumsum_preserve_dtypesD   sj    Y[?STUIRXX6IRZZ8W^^%
 	fh/r   N)
__name__
__module____qualname__r   r(   pytestmarkparametrizer3   r<    r   r   r   r      s8    	 [[X'PQ< R<$0r   r   )__doc__numpyr   r@   pandasr   r   pandas._testing_testingr.   r   rC   r   r   <module>rI      s&      >0 >0r   