3
���hX � @ s� d Z ddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ ddlj
ZddlmZ dd � Zejjd
ejdg�dd� �ZdS )
zg
Though Index.fillna and Series.fillna has separate impl,
test here to confirm these works as the same
� N)�iNaT)�needs_i8_conversion)�
ABCMultiIndex)�Index)�allow_na_opsc C sp | }t |t�rtjd� t|�dkr.|jd nd}|j|�}t |t�rTtj ||� ntj
||� ||k slt�d S )NzMultiIndex doesn't support isnar )�
isinstancer �pytest�skip�len�values�fillnar �tm�assert_index_equal�assert_series_equal�AssertionError)�index_or_series_obj�obj�
fill_value�result� r �?/tmp/pip-build-5_djhm0z/pandas/pandas/tests/base/test_fillna.py�test_fillna s
r �null_objc C s� |}t |�}t|�s&tj|� d�� n4t|�dk r>tjd� nt|t�rZtjd| � d�� |j}|d }|j� }t |j
�r�t|dd�< |