a
    Pf                     @   s2   d dl Z d dlmZ d dlmZ G dd dZdS )    N)DatetimeArrayc                   @   s.   e Zd Zdd Zejdddgdd ZdS )	TestAccumulatorc                 C   sn   t jg dddd}|d}t jdgd dd}t|| |d}t jg ddd}t|| d S )	N)
2000-01-01
2000-01-02z
2000-01-03M8[ns]ZdtypeinferZcumminr      Zcummax)r   _from_sequence
_with_freq_accumulatetmZassert_datetime_array_equal)selfarrresultexpected r   f/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/arrays/datetimes/test_cumulative.pytest_accumulators_freq   s    

z&TestAccumulator.test_accumulators_freqfuncZcumsumZcumprodc                 C   sZ   t jddgddd}tjtd| d || W d    n1 sL0    Y  d S )Nr   r   r   r   r   zAccumulation )match)r   r
   r   pytestZraises	TypeErrorr   )r   r   r   r   r   r   test_accumulators_disallowed!   s    z,TestAccumulator.test_accumulators_disallowedN)__name__
__module____qualname__r   r   markZparametrizer   r   r   r   r   r      s   r   )r   Zpandas._testingZ_testingr   Zpandas.core.arraysr   r   r   r   r   r   <module>   s   