a
    PfW                     @   sN  d dl Zd dlZd dlZd dlmZ d dlm	Z	 ej
dddgejddgejdfejddgddejddgejdfejddgddejddgejdfeddgejddgejdfg d	ejg d	ejdfeg d	ejg d	ejdfejg d	d
dejg d	ejdfg ejg ejdfgdd Zej
dg dejg dd
dgdd Zej
dddgejddgd
dejddgejdgdd Zej
dg dejd dejgddgdd Zej
dddgejddgddejddgedejddgedgdd Zdd  Zej
ddeed d!d"gd#d$ ZdS )%    N)check_array_indexerzindexer, expected      ZdtypeZint64ZInt32)TFTbooleanc                 C   s(   t g d}t|| }t|| d S Nr   r      )nparrayr   tmassert_numpy_array_equal)indexerexpectedarrresult r   a/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/indexing/test_check_indexer.pytest_valid_input	   s    
r   r   )TFNc                 C   s:   t g d}t|| }t jg dtd}t|| d S )Nr   )TFFr   )r
   r   r   boolr   r   )r   r   r   r   r   r   r   test_boolean_na_returns_indexer"   s    
r   TFc                 C   sN   t g d}d}tjt|d t||  W d    n1 s@0    Y  d S )Nr   zBoolean index has wrong lengthmatchr
   r   pytestraises
IndexErrorr   r   r   msgr   r   r   test_bool_raise_length/   s    	r   )r   r   NZInt64c                 C   sN   t g d}d}tjt|d t||  W d    n1 s@0    Y  d S )Nr   z9Cannot index with an integer indexer containing NA valuesr   )r
   r   r   r   
ValueErrorr   r   r   r   r   test_int_raise_missing_values?   s    r!   g        g      ?g       @Zfloat64c                 C   sN   t g d}d}tjt|d t||  W d    n1 s@0    Y  d S )Nr   9arrays used as indices must be of integer or boolean typer   r   r   r   r   r   test_raise_invalid_array_dtypesJ   s    
r#   c                 C   s`   t jddg| d}tg d}d}tjt|d t|| W d    n1 sR0    Y  d S )Nabr   r   r"   r   )pdr   r
   r   r   r   r   )Znullable_string_dtyper   r   r   r   r   r    test_raise_nullable_string_dtype[   s
    r'   r	   )Nc                 C   s(   t g d}t|| }|| ks$J d S r   )r
   r   r   )r   r   r   r   r   r   !test_pass_through_non_array_likesd   s    
r(   )numpyr
   r   Zpandasr&   Zpandas._testingZ_testingr   Zpandas.api.indexersr   markZparametrizer   ZintpIndexZbool_r   r   r   ZNAr!   objectr#   r'   Ellipsisslicer(   r   r   r   r   <module>   s^   $$  




	
	