a
    j=ic                     @   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rNd}tjt|d |d W d    n1 s@0    Y  d S t|dkrd|jd nd}||}t	|| ||usJ d S )Nz"isna is not defined for MultiIndex)matchr   )

isinstancer   pytestZraisesNotImplementedErrorfillnalenvaluestmassert_equal)index_or_series_objobjmsg
fill_valueresult r   n/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/pandas/tests/base/test_fillna.pytest_fillna   s    
(
r   null_objc                 C   s   |}t |}t|s&t| d n4t|dk r>td nt|trZtd|  d |j}|d }| }| |dd< ||dd< ||}||}|	|}t
|| ||usJ 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   Z_valuescopyr   r   r   )r   r   r   klassr
   r   expectedr   r   r   r   test_fillna_null"   s$    

r   )__doc__numpynpr   Zpandasr   Zpandas._testingZ_testingr   Zpandas.tests.base.commonr   r   markZparametrizenanr   r   r   r   r   <module>   s   