o
    g                     @   s  d dl Z d dlZd dlmZ ejdd Zejdd Zejdd Zejd	d
 Zejdd
gddd Z	ejdd Z
ejdd Zejdd Zejdd Zejdd Zejdd Zejddgddd Zejdd d d d!d d"d gg d#d$d%d& Zejddgdd'd( Zejddgdd)d* Zejddgdd+d, Zejd-d.gdd/d0 Zejddgdd1d2 ZdS )3    N)Seriesc                   C      t )z3A fixture providing the ExtensionDtype to validate.NotImplementedError r   r   ]/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/pandas/tests/extension/conftest.pydtype      r   c                   C   r   )z
    Length-100 array for this type.

    * data[0] and data[1] should both be non missing
    * data[0] and data[1] should not be equal
    r   r   r   r   r   data      r
   c                   C   r   )z3Length-100 array in which all the elements are two.r   r   r   r   r   data_for_twos   r	   r   c                   C   r   )zLength-2 array with [NA, Valid]r   r   r   r   r   data_missing   r	   r   )paramsc                 C   s    | j dkr|S | j dkr|S dS )z5Parametrized fixture giving 'data' and 'data_missing'r
   r   Nparam)requestr
   r   r   r   r   all_data%   s
   

r   c                    s    fdd}|S )a  
    Generate many datasets.

    Parameters
    ----------
    data : fixture implementing `data`

    Returns
    -------
    Callable[[int], Generator]:
        A callable that takes a `count` argument and
        returns a generator yielding `count` datasets.
    c                 3   s    t | D ]} V  qd S N)range)count_r
   r   r   gen>   s   zdata_repeated.<locals>.genr   )r
   r   r   r   r   data_repeated.   s   r   c                   C   r   )zn
    Length-3 array with a known sort order.

    This should be three items [B, C, A] with
    A < B < C
    r   r   r   r   r   data_for_sortingE   r   r   c                   C   r   )z{
    Length-3 array with a known sort order.

    This should be three items [B, NA, A] with
    A < B and NA missing.
    r   r   r   r   r   data_missing_for_sortingP   r   r   c                   C   s   t jS )z
    Binary operator for comparing NA values.

    Should return a function of two arguments that returns
    True if both arguments are (scalar) NA for your type.

    By default, uses ``operator.is_``
    )operatoris_r   r   r   r   na_cmp[   s   
r   c                   C      dS )z6The scalar missing value for this type. Default 'None'Nr   r   r   r   r   na_valueh   r	   r    c                   C   r   )z
    Data for factorization, grouping, and unique tests.

    Expected to be like [B, B, NA, NA, A, A, B, C]

    Where A < B < C and NA is missing
    r   r   r   r   r   data_for_groupingn   s   	r!   TFc                 C      | j S )z#Whether to box the data in a Seriesr   r   r   r   r   box_in_seriesz   s   r$   c                 C   r   N   r   xr   r   r   <lambda>       r)   c                 C   s   dgt |  S r%   )lenr'   r   r   r   r)      s    c                 C   s   t dgt|  S r%   )r   r+   r'   r   r   r   r)      s    c                 C   s   | S r   r   r'   r   r   r   r)      r*   )scalarlistseriesobject)r   idsc                 C   r"   )z,
    Functions to test groupby.apply().
    r   r#   r   r   r   groupby_apply_op   s   r1   c                 C   r"   )zU
    Boolean fixture to support Series and Series.to_frame() comparison testing.
    r   r#   r   r   r   as_frame      r2   c                 C   r"   )zL
    Boolean fixture to support arr and Series(arr) comparison testing.
    r   r#   r   r   r   	as_series   r3   r4   c                 C   r"   )zd
    Boolean fixture to support comparison testing of ExtensionDtype array
    and numpy array.
    r   r#   r   r   r   	use_numpy      r5   ffillbfillc                 C   r"   )z{
    Parametrized fixture giving method parameters 'ffill' and 'bfill' for
    Series.fillna(method=<method>) testing.
    r   r#   r   r   r   fillna_method   r6   r9   c                 C   r"   )zR
    Boolean fixture to support ExtensionDtype _from_sequence method testing.
    r   r#   r   r   r   as_array   r3   r:   )r   pytestpandasr   fixturer   r
   r   r   r   r   r   r   r   r    r!   r$   r1   r2   r4   r5   r9   r:   r   r   r   r   <module>   s\    















	



