
    d                     ~   d dl Z d dlZd dlmZmZ ej        d             Zej        d             Zej        d             Zej        d             Z	 ej        ddg	          d
             Z
ej        d             Zej        d             Zej        d             Zej        d             Zej        d             Zej        d             Z ej        ddg	          d             Z ej        d d d d gg d          d             Z ej        ddg	          d             Z ej        ddg	          d             Z ej        ddg	          d             Z ej        ddg	          d              Z ej        ddg	          d!             Zej        d"             Zej        d#efd$            ZdS )%    N)Seriesoptionsc                      t           )z3A fixture providing the ExtensionDtype to validate.NotImplementedError     [/var/www/html/t/fyr/venv311/lib/python3.11/site-packages/pandas/tests/extension/conftest.pydtyper      
     r	   c                      t           )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
   datar      
     r	   c                      t           )z3Length-100 array in which all the elements are two.r   r   r	   r
   data_for_twosr      r   r	   c                      t           )zLength-2 array with [NA, Valid]r   r   r	   r
   data_missingr   "   r   r	   r   r   )paramsc                 :    | 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   s      r
   all_datar   (   s1     }	.	(	( 
)	(r	   c                       f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   8   K   t          |           D ]}V  d S N)range)count_r   s     r
   genzdata_repeated.<locals>.genA   s1      u 	 	AJJJJ	 	r	   r   )r   r    s   ` r
   data_repeatedr!   1   s#          Jr	   c                      t           )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
   data_for_sortingr#   H   r   r	   c                      t           )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
   data_missing_for_sortingr%   S   r   r	   c                      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
   na_cmpr)   ^   s     <r	   c                      dS )z6The scalar missing value for this type. Default 'None'Nr   r   r	   r
   na_valuer+   k   s	     4r	   c                      t           )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
   data_for_groupingr-   q   s
     r	   TFc                     | j         S )z#Whether to box the data in a Seriesr   r   s    r
   box_in_seriesr0   }   s     =r	   c                     dS N   r   xs    r
   <lambda>r6          ! r	   c                 (    dgt          |           z  S r2   )lenr4   s    r
   r6   r6      s    1#A, r	   c                 B    t          dgt          |           z            S r2   )r   r9   r4   s    r
   r6   r6      s    &!s1vv&& r	   c                     | S r   r   r4   s    r
   r6   r6      r7   r	   )scalarlistseriesobject)r   idsc                     | j         S )z,
    Functions to test groupby.apply().
    r   r/   s    r
   groupby_apply_oprB      s     =r	   c                     | j         S )zU
    Boolean fixture to support Series and Series.to_frame() comparison testing.
    r   r/   s    r
   as_framerD          
 =r	   c                     | j         S )zL
    Boolean fixture to support arr and Series(arr) comparison testing.
    r   r/   s    r
   	as_seriesrG      rE   r	   c                     | j         S )zd
    Boolean fixture to support comparison testing of ExtensionDtype array
    and numpy array.
    r   r/   s    r
   	use_numpyrI           =r	   ffillbfillc                     | j         S )z{
    Parametrized fixture giving method parameters 'ffill' and 'bfill' for
    Series.fillna(method=<method>) testing.
    r   r/   s    r
   fillna_methodrN      rJ   r	   c                     | j         S )zR
    Boolean fixture to support ExtensionDtype _from_sequence method testing.
    r   r/   s    r
   as_arrayrP      rE   r	   c                 @    t                               t                     S )z
    A scalar that *cannot* be held by this ExtensionArray.

    The default should work for most subclasses, but is not guaranteed.

    If the array can hold any item (i.e. object dtype), then use pytest.skip.
    )r?   __new__)r   s    r
   invalid_scalarrS      s     >>&!!!r	   returnc                  N    t           j        j        ot           j        j        dk    S )z7
    Fixture to check if Copy-on-Write is enabled.
    block)r   modecopy_on_writedata_managerr   r	   r
   using_copy_on_writerZ      s    
 <%N',*Cw*NNr	   )r'   pytestpandasr   r   fixturer   r   r   r   r   r!   r#   r%   r)   r+   r-   r0   rB   rD   rG   rI   rN   rP   rS   boolrZ   r   r	   r
   <module>r_      sZ              
      
   
 /000  10   ,       	 	 	   
    e}%%%  &%
 &&	 	/..     e}%%%  &% e}%%%  &% e}%%%  &% )***  +* e}%%%  &% " " " OT O O O O O Or	   