gL iU HdZddlZddlZddlmZmZddlmZ GddZ y)z[ Tests for DataFrame cumulative operations See also -------- tests.series.test_cumulative N) DataFrameSeriescfeZdZdZdZej jdgddZdZ y)TestDataFrameCumulativeOpscttdtjditjd}|j|j |j ttjdj ddtdtd}|j y)NA)index)r columns)rnparangecummaxcummincumsumreshaperange)selfdfdms h/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/tests/frame/test_cumulative.pytest_cumulative_ops_smokez4TestDataFrameCumulativeOps.test_cumulative_ops_smokess RYYr]+299R= A   ryy},,Q2%(ERSH U ctj|jdddf<tj|jdddf<tj|jdddf<|jdj t }|j d|j d|jdj tj}|j d|j dy)Nr r)rnanilocfillnaastypeintcumprodint32)rdatetime_framers rtest_cumprod_smokez-TestDataFrameCumulativeOps.test_cumprod_smoke"s')vvAbD!G$(*BrE1H%&(ffBCF# " "1 % , ,S 1 1  1  " "1 % , ,RXX 6 1  1 rmethod)rr%rrcDtj|jdddf<tj|jdddf<tj|jdddf<t||}|j tt |}t j||t||d}|j tt |d}t j||tj|tj|k(sJy)Nr rrrrr)axis) rr r!getattrapplyrtmassert_frame_equalshape)rr'r)resultexpecteds r&test_cumulative_ops_match_series_applyzATestDataFrameCumulativeOps.test_cumulative_ops_match_series_apply1s')vvAbD!G$(*BrE1H%&(ffBCF#102!''(?@ fh/10a8!''(?a'H fh/xx288N#;;;;rc&tgdgdgdd}|j}ttgdtjtgdtj |djd}t j||y)N)rr)rrg@)TFF)rBC)rr5)dtyper7)rrrrint64float64r.r/)rrr1r2s rtest_cumsum_preserve_dtypesz6TestDataFrameCumulativeOps.test_cumsum_preserve_dtypesDsj Y[?ST UIRXX6IRZZ8W^^%   fh/rN) __name__ __module__ __qualname__rr(pytestmark parametrizer3r<rrrrs8   [[X'PQ<R<$ 0rr) __doc__numpyrr@pandasrrpandas._testing_testingr.rrCrrrIs& >0>0r