o
    _~#g                     @   s&   d dl Z d dlmZ G dd dZdS )    Nc                   @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
TestDataFrameTakec                 C   s   |}t ddd}tt |j|dd W d    n1 sw   Y  tt |j|dd W d    d S 1 s<w   Y  d S )Nr         axis)slicetmassert_produces_warningFutureWarningtake)selffloat_framedfslc r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/frame/indexing/test_take.pytest_take_slices_deprecated   s   "z-TestDataFrameTake.test_take_slices_deprecatedc                 C   s  g d}|fD ]2}|j |dd}||j |}t|| |j |dd}|jd d g df }tj||dd qg d}|fD ]?}|j |dd}||j |}t|| |j |dd}t|| |j |dd}|jd d g d	f }tj||dd qAd
}tjt|d |j g ddd W d    n1 sw   Y  tjt|d |j g ddd W d    n1 sw   Y  tjt|d |j g ddd W d    n1 sw   Y  tjt|d |j g ddd W d    d S 1 sw   Y  d S )N)   r      r   r   r   r   )DBCAF)check_names)r   r   )r   r   r   zindices are out-of-bounds)match)r   r   r      )r   r   r   i)r   r   r      )r   r   r   )	r   reindexindexr   assert_frame_equallocpytestraises
IndexError)r   r   orderr   resultexpectedmsgr   r   r   	test_take   s>   

"zTestDataFrameTake.test_takec                 C   s   g d}|fD ]0}|j |dd}||j |}t|| |j |dd}|jd d g df }t|| qg d}|fD ]0}|j |dd}||j |}t|| |j |dd}|jd d g df }t|| q?d S )N)r   r   r   r   r   r   r   r   )foor   r   r   r   )r   r   )r+   r   r   r   r   r    r   r!   r"   )r   float_string_framer&   r   r'   r(   r   r   r   test_take_mixed_type8   s"   

z&TestDataFrameTake.test_take_mixed_typec                 C   sv   g d}||fD ]0}|j |dd}||j |}t|| |j |dd}|jd d g df }t|| qd S )N)r   r   r   r   r   r   r   )r   r   r   r   r-   )r   mixed_float_framemixed_int_framer&   r   r'   r(   r   r   r   test_take_mixed_numericQ   s   z)TestDataFrameTake.test_take_mixed_numericN)__name__
__module____qualname__r   r*   r/   r2   r   r   r   r   r      s
    
'r   )r#   pandas._testing_testingr   r   r   r   r   r   <module>   s    