o
    _~#gU	                     @   sB   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 dZ
dS )z[
Tests for DataFrame cumulative operations

See also
--------
tests.series.test_cumulative
    N)	DataFrameSeriesc                   @   s>   e Zd Zdd Zdd Zejdg ddd Zd	d
 Z	dS )TestDataFrameCumulativeOpsc                 C   sd   t dtditdd}|  |  |  t tdddtdtdd}|  d S )NA   )index      )r   columns)r   nparangecummaxcummincumsumreshaperange)selfdfdm r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/frame/test_cumulative.pytest_cumulative_ops_smoke   s   $z4TestDataFrameCumulativeOps.test_cumulative_ops_smokec                 C   s   t j|jdddf< t j|jdddf< t j|jdd df< |dt}|d |d |dt j}|d |d d S )Nr	   
   r            )r   nanilocfillnaastypeintcumprodint32)r   datetime_framer   r   r   r   test_cumprod_smoke"   s   


z-TestDataFrameCumulativeOps.test_cumprod_smokemethod)r   r!   r   r   c                 C   s   t j|jdddf< t j|jdddf< t j|jdd df< t|| }|tt|}t|| t||dd}|jtt|dd}t|| t |t |ksVJ d S )Nr	   r   r   r   r   r   )axis)	r   r   r   getattrapplyr   tmassert_frame_equalshape)r   r#   r%   resultexpectedr   r   r   &test_cumulative_ops_match_series_apply1   s   zATestDataFrameCumulativeOps.test_cumulative_ops_match_series_applyc                 C   sh   t g dg dg dd}| }t tg dtjdtg dtjd|d  d}t|| d S )N)r   r      )r   r   g      @)TFF)r   BC)r   r/      )dtyper1   )r   r   r   r   int64float64r)   r*   )r   r   r,   r-   r   r   r   test_cumsum_preserve_dtypesD   s   
z6TestDataFrameCumulativeOps.test_cumsum_preserve_dtypesN)
__name__
__module____qualname__r   r$   pytestmarkparametrizer.   r6   r   r   r   r   r      s    
r   )__doc__numpyr   r:   pandasr   r   pandas._testing_testingr)   r   r   r   r   r   <module>   s    