a
    Pf                     @   s6   d dl Z d dlmZmZ d dlmZ G dd dZdS )    N)	DataFrameSeriesc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestPipec                 C   s\   t dg di}t dg di}|tu r8|d }|d }dd }||d}t|| d S )NA         )r      	   c                 S   s   | | S N xyr   r   ]/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/frame/methods/test_pipe.py<lambda>       z$TestPipe.test_pipe.<locals>.<lambda>r   )r   r   pipetmassert_equal)selfframe_or_seriesobjexpectedfresultr   r   r   	test_pipe   s    zTestPipe.test_pipec                 C   sD   t dg di}t||}dd }||dfd}t|| d S )Nr   r   c                 S   s   |S r   r   r   r   r   r   r      r   z*TestPipe.test_pipe_tuple.<locals>.<lambda>r   r   )r   r   get_objr   r   )r   r   r   r   r   r   r   r   test_pipe_tuple   s
    zTestPipe.test_pipe_tuplec                 C   sn   t dg di}t||}dd }d}tjt|d$ |j|dfdd	d
 W d    n1 s`0    Y  d S )Nr   r   c                 S   s   |S r   r   r   r   r   r   r   "   r   z0TestPipe.test_pipe_tuple_error.<locals>.<lambda>z0y is both the pipe target and a keyword argument)matchr   r   r   r   )r   r   r   pytestZraises
ValueErrorr   )r   r   r   r   msgr   r   r   test_pipe_tuple_error   s    zTestPipe.test_pipe_tuple_errorN)__name__
__module____qualname__r   r   r$   r   r   r   r   r   
   s   r   )r!   Zpandasr   r   Zpandas._testingZ_testingr   r   r   r   r   r   <module>   s   