
    Eg
                        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 Zd Zej	                            dd	d
gddgg          d             Zej	                            dddgddgg          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                     d}| }ddddddddd	}t          |          }|                    t          |          d
dg          }t          j        ||           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results         `/var/www/sysmax/venv/lib/python3.11/site-packages/pandas/tests/io/parser/usecols/test_strings.py!test_usecols_with_unicode_stringsr      s    D F $!!
 

 q!! H ""H__Xd^^eU^_DDF&(+++++    c                     d}| }ddddddddd	}t          |          }|                    t          |          d
dg          }t          j        ||           d S )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   s         r   -test_usecols_with_single_byte_unicode_stringsr$   '   s    D F $!!
 

 qQ H ""H__Xd^^c3Z_@@F&(+++++r    r   r   s   BBBs   AAAr   c                     d}| }d}t          j        t          |          5  |                    t	          |          |           d d d            d S # 1 swxY 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_args        r   (test_usecols_with_mixed_encoding_stringsr+   =   s    D F	" 
 
z)B	C	C	C 9 98889 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9s   %AAA	   あああ   いいc                     d}| }ddddddddd	}t          |          }|                    t          |          |
          }t          j        ||           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   s          r   'test_usecols_with_multi_byte_charactersr/   M   s    D F $!!
 

 A!$$ H ""H__Xd^^W_==F&(+++++r    )__doc__ior   r'   pandasr   pandas._testing_testingr   markfilterwarnings
pytestmarkr   r$   parametrizer+   r/    r    r   <module>r:      s                      [''C 

, , ,,, , ,, eV_vuo$FGG9 9 HG9 k8%<{H>U$VWW, , XW, , ,r    