o
    h                     @   s`   d Z ddlZddlZddlmZ ddlmZ ddl	m
Z
 dd Zejdejdgdd	 ZdS )
zg
Though Index.fillna and Series.fillna has separate impl,
test here to confirm these works as the same
    N)
MultiIndex)allow_na_opsc                 C   s   | }t |tr(d}tjt|d |d W d    d S 1 s!w   Y  d S t|dkr3|jd nd}||}t	|| ||usFJ d S )Nz"isna is not defined for MultiIndex)matchr   )

isinstancer   pytestraisesNotImplementedErrorfillnalenvaluestmassert_equal)index_or_series_objobjmsg
fill_valueresult r   q/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/pandas/tests/base/test_fillna.pytest_fillna   s   


r   null_objc                 C   s   |}t |}t|st| d nt|dk rtd nt|tr-td|  d |j}|d }| }| |dd< ||dd< ||}||}|	|}t
|| ||us]J d S )Nz  doesn't allow for NA operations   z%Test doesn't make sense on empty datazMultiIndex can't hold ''r      )typer   r   skipr
   r   r   _valuescopyr	   r   r   )r   r   r   klassr   r   expectedr   r   r   r   test_fillna_null"   s$   

r    )__doc__numpynpr   pandasr   pandas._testing_testingr   pandas.tests.base.commonr   r   markparametrizenanr    r   r   r   r   <module>   s    