o
    ŀg
                     @   s   d Z ddlmZ ddlZddlmZ ddlmZ ej	
dZdd Zdd	 Zej	d
ddgddggdd Zej	d
ddgddggdd ZdS )z]
Tests the usecols functionality during parsing
for all of the parsers defined in parsers.py
    )StringION)	DataFramez=ignore:Passing a BlockManager to DataFrame:DeprecationWarningc                 C   P   d}| }ddddddddd	}t |}|jt|d
dgd}t|| d S )NPAAA,BBB,CCC,DDD
0.056674973,8,True,a
2.613230982,2,False,b
3.568935038,7,False,a?$@r.-@r            r      )AAABBBr   r   usecolsr   read_csvr   tmassert_frame_equalall_parsersdataparserexp_dataexpectedresult r   _/var/www/html/myenv/lib/python3.10/site-packages/pandas/tests/io/parser/usecols/test_strings.py!test_usecols_with_unicode_strings      
r   c                 C   r   )NzHA,B,C,D
0.056674973,8,True,a
2.613230982,2,False,b
3.568935038,7,False,ar   r   r   r	   r   r   r   )ABr!   r"   r   r   r   r   r   r   -test_usecols_with_single_byte_unicode_strings'   r    r#   r   r   s   BBBs   AAAr   c                 C   sR   d}| }d}t jt|d |jt||d W d    d S 1 s"w   Y  d S )Nr   z['usecols' must either be list-like of all strings, all unicode, all integers or a callable.)matchr   )pytestraises
ValueErrorr   r   )r   r   r   r   _msg_validate_usecols_argr   r   r   (test_usecols_with_mixed_encoding_strings=   s   "r)   	   あああ   いいc                 C   sL   d}| }ddddddddd	}t |}|jt||d
}t|| d S )Nuh   あああ,いい,ううう,ええええ
0.056674973,8,True,a
2.613230982,2,False,b
3.568935038,7,False,ar   r   r   r	   r   r   r   )r*   r+   r   r   )r   r   r   r   r   r   r   r   r   r   'test_usecols_with_multi_byte_charactersM   s   
r,   )__doc__ior   r%   pandasr   pandas._testing_testingr   markfilterwarnings
pytestmarkr   r#   parametrizer)   r,   r   r   r   r   <module>   s    
