
    Owg:                     @    d dl Zd dlZd dlmZ d dlmZ  G d d      Zy)    N)CategoricalIndexc                       e Zd Zd Zd Zd Zy)
TestFillNAc                    t        dt        j                  ddgd      }t        g dd      }t        j                  |j                  d      |       |j                  }d}t        j                  t        |      5  |j                  d       d d d        |j                  d      }|j                  t              j                  d      }t        j                  ||       y # 1 sw Y   UxY w)	N      ?      @x)name)r   r   r   r   3Cannot setitem on a Categorical with a new categorymatchg       @)r   npnantmassert_index_equalfillna_datapytestraises	TypeErrorastypeobject)selfidxexpcatmsgresultexpecteds          c/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/indexes/categorical/test_fillna.pytest_fillna_categoricalz"TestFillNA.test_fillna_categorical	   s    RVVS#6SA3#>
cjjos3ii D]]9C0 	JJsO	 C::f%,,S1
fh/	 	s   =C##C,c                 J   t        g d      }|j                  d      }||usJ t        j                  ||      sJ |j                  }|j                  d      }|j
                  |j
                  usJ |j
                  j                  J t        j                  ||      rJ y )N)r      r#   r   )r   r   r   shares_memoryr   _ndarraybase)r   cir   r   s       r    test_fillna_copies_with_no_nasz)TestFillNA.test_fillna_copies_with_no_nas   s     i(1R+++ hhAcll222##+++##FC0000    c                 
   t        g d      }|j                  }d}|j                  d      }t        j                  ||       t        j                  t        |      5  |j                  d       d d d        y # 1 sw Y   y xY w)N)      r,   r   Fr   )r   r   r   r   r   r   r   r   )r   r'   r   r   ress        r    !test_fillna_validates_with_no_nasz,TestFillNA.test_fillna_validates_with_no_nas*   si    i(hhCii
c2& ]]9C0 	JJu	 	 	s   A99BN)__name__
__module____qualname__r!   r(   r.    r)   r    r   r      s    0$1r)   r   )	numpyr   r   pandasr   pandas._testing_testingr   r   r2   r)   r    <module>r7      s      # . .r)   