
    bMh	                     T    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dS )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dS )	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 d S )
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        g/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/arrays/test_ndarray_backed.pytest_empty_categoricalz TestEmpty.test_empty_categorical   si   ooot<<< #E777&+.....|u$$$$$//// #G5999&+.....|w&&&&$////V d5::..2EBBB#E777&+.....|u$$$$$000000    c                     t          ddd          }|j        }d}t          j        ||          }|j        |k    sJ t	          |t                    sJ |j        |k    sJ d S )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-   sy    q\BBB	%e5999|u$$$$&-00000|u$$$$$$r"   c                 ~    d}t          j        |d          }t          |t                     sJ |j        |k    sJ d S )N   	   zdatetime64[ns]r   )r   r   r   r   r   r   r   s      r    test_empty_dt64zTestEmpty.test_empty_dt647   sL    %e3CDDD&-00000|u$$$$$$r"   c                 ~    d}t          j        |d          }t          |t                     sJ |j        |k    sJ d S )Nr*   zm8[ns]r   )r   r   r   r   r-   s      r    test_empty_td64zTestEmpty.test_empty_td64=   sK    &uH===&.11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 d S )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   s    !"(Aq6"2"233	$+E???&"566666|u$$$$|u$$$$$$r"   N)__name__
__module____qualname__r!   r(   r.   r0   r5    r"   r    r
   r
      s_        1 1 14% % %% % %% % %% % % % %r"   r
   )__doc__numpyr   pandasr   r   pandas.core.arraysr   r   r   r   r
   r9   r"   r    <module>r>      s                          9% 9% 9% 9% 9% 9% 9% 9% 9% 9%r"   