
    Owg	                     L    d Z ddlZddlmZmZ ddlmZmZm	Z	m
Z
  G d d      Zy)z5
Tests for subclasses of NDArrayBackedExtensionArray
    N)CategoricalIndex
date_range)CategoricalDatetimeArrayNumpyExtensionArrayTimedeltaArrayc                   *    e Zd Zd Zd Zd Zd Zd Zy)	TestEmptyc                    t        g dd      }|j                  }d}t        j                  ||      }t	        |t              sJ |j
                  |k(  sJ |j                  j                  t        j                  k(  sJ t        j                  d|      }t	        |t              sJ |j
                  dk(  sJ |j                  j                  t        j                  k(  sJ t        |       t        t        t        d            dz  d	      }|j                  }t        j                  ||      }t	        |t              sJ |j
                  |k(  sJ |j                  j                  t        j                  k(  sJ y )
N)abcT)ordered)   dtype)i   i   r   F)r   r   r   _empty
isinstanceshape_ndarraynpint8reprlistrangeint16)selfcir   r   results        ^/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/arrays/test_ndarray_backed.pytest_empty_categoricalz TestEmpty.test_empty_categorical   s<   ot< ##E7&+...||u$$$$$/// ##G59&+...||w&&&$$///V d5:.2EB##E7&+...||u$$$$$000    c                     t        ddd      }|j                  }d}t        j                  ||      }|j                  |k(  sJ t	        |t              sJ |j
                  |k(  sJ y )Nz
2016-01-01   z
Asia/Tokyo)periodstz)r   r   )r   r   r   r   r   r   )r   dtir   r   r   s        r    test_empty_dt64tzzTestEmpty.test_empty_dt64tz-   sd    q\B		%%e59||u$$$&-000||u$$$r"   c                 |    d}t        j                  |d      }t        |t               sJ |j                  |k(  sJ y )N   	   zdatetime64[ns]r   )r   r   r   r   r   r   r   s      r    test_empty_dt64zTestEmpty.test_empty_dt647   s<    %%e3CD&-000||u$$$r"   c                 |    d}t        j                  |d      }t        |t               sJ |j                  |k(  sJ y )Nr*   zm8[ns]r   )r   r   r   r   r-   s      r    test_empty_td64zTestEmpty.test_empty_td64=   s;    &&uH=&.111||u$$$r"   c                     t        t        j                  ddg            }|j                  }d}t        j                  ||      }t        |t               sJ |j                  |k(  sJ |j                  |k(  sJ y )N   r$   r*   r   )r   r   arrayr   r   r   r   )r   arrr   r   r   s        r    test_empty_pandas_arrayz!TestEmpty.test_empty_pandas_arrayC   sn    !"((Aq6"23		$++E?&"5666||u$$$||u$$$r"   N)__name__
__module____qualname__r!   r(   r.   r0   r5    r"   r    r
   r
      s    14%%%%r"   r
   )__doc__numpyr   pandasr   r   pandas.core.arraysr   r   r   r   r
   r9   r"   r    <module>r>      s(     9% 9%r"   