HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/pandas/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/pandas/__pycache__/conftest.cpython-36.pyc
3

���hqz�@s
dZddlmZddlmZmZmZmZddlm	Z	ddl
Z
ddlZddlm
Z
mZddlZddlmZddlZddlZddlmZmZddljjZddlZdd	lmZddlj Z!dd
l"m#Z#ddl$m%Z%m&Z&dd
�Z'dd�Z(dd�Z)ej*j+ddej,j-fd�ej*j.d�xFdj/�D]:Z0e1ej2j3e0�Z4ej5e4ej6e4ej7�d-d�ej8�d���qWxRdj/�D]FZ0e1ej2j3e0�Z4ej5e4ej6e4ej7�d.d�ej8�ej7ddd�d���q\WxRdj/�D]FZ0e1ej2j3e0�Z4ej5e4ej6e4ej7�d/d�ej8�ej7ddd�d ���q�Wej9d!d"�d#d$��Z:ej9d!d"�d%d&��Z;ej9ddd'd(gd)d*�d+�d,d-��Z<e<Z=ej9dd'gd.d*�d+�d/d0��Z>ej9d!d1dgd2�d3d4��Z?ej9d!d1dgd2�d5d6��Z@ej9d7d8d1gd2�d9d:��ZAej9d;d<d=d>gd2�d?d@��ZBej9d;d<d=d>gd2�dAdB��ZCej9ddCdDdEdFgd2�dGdH��ZDej9dCdDdEdFgd2�dIdJ��ZEej9d!d1gd2�dKdL��ZFej9dMdNd;d<gd2�dOdP��ZGej9dQdRgd2�dSdT��ZHej9dejIejJeKdU�ejLgeMd+�dVdW��ZNeNZOej9dejIejJgd2�dXdY��ZPePZQej9ej%ejRgd'dZgd+�d[d\��ZSeSZTej9d]d^��ZUej9d_d`��ZVej9dadb��ZWdcdd�ZXdedf�ZYe!jZdg�e!j[dg�e!j\dg�e!j\dgdhdi�e!j]dg�e!j^dg�e!j_dg�e!j`dg�e!jadg�e!jbdg�e!jcdj�e!jddg�e!jedg�e%g�e&jfegdkdldmgddndog��eY�eX�e%dddddndng�dp�Zhej9ehji�d2�dqd'��ZjejZkej9drds��Zlej9dtdu��Zmej9dvdw��Znej9dxdy��Zodzd{�Zpd|d}�ehjq�D�Zrej9d~d��Zsejtejuejvejwejxejyejzej{gZ|d�d}�e|D�Z}ej9e}ji�d2�d�d���Z~ehere}�Zej9eji�d2�d�d���Z�ej9d�d���Z�ej9d�d���Z�ej9d�d���Z�ej9d�d���Z�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZ�ej9e�d2�d�d���Z�ej9e
j�e#j�e
j�e#j�e
j�e#j�e
j�e#j�e
j�e#j�e
j�e#j�e
j�e#j�gd2�d�d���Z�d�d�d�d�d�d�d�d�d�d�g
Z�ej9e�d2�d�d���Z�d�d�gZ�ej9e�d2�d�d���Z�e�e�Z�ej9e�d2�d�d���Z�ej9d�d�d�d�d�d�gd2�d�d���Z�ej9d�d�d�d�gd2�d�d���Z�ej9d�d�d�d�d�d�gd2�d�d„�Z�ej9d�dĄ�Z�ej9d�dƄ�Z�ej9d�dȄ�Z�dd�d�d�d�d�e�e
�ed΃ed�e�d0�ejeeddύ�ee�d1dύdkdЍgZ�d�d҄e�D�Z�ej�eMe���ej9e�e�d+�d�dԄ��Z�ej�eMe�dd���ej9e�dd�e�dd�d+�d�dք��Z�e�Z�ej9d�d؍d�dڄ�Z�ej9d�d�ee�ejgd2�d�dބ�Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d��Z�ej9e!j�d2�d�d���Z�ej9e!j�d2�d�d���Z�ej9e!j�d2�d�d���Z�d�d�ejId�gfd�d�ejLd�gfd�d�ejI�dgf�dejIejIejIgf�dgf�dd�ejIdngf�dd�ejI�dgf�d�dejI�dgf�ddejIdngf�ddejI�dgf�d	e	d�ejIe	dn�gf�d
d!ejId1gf�d
d!ejLd1gf�dejƐd�ejIejƐd
�gf�dejǐd�ejIejǐd�gf�de�ddd�ejIe�ddd�gf�ded�ejIedn�gf�ded�ejIedn�gf�dejȐd�ejJejȐd�gf�dej�dd�ejIej�ddn�gfgZ�egeʎ\Z�Z�ej9e�e�d+��d�d��Z�ej9�d�d��Z�ej9�d�d�d�d�d �d!�d"gd2��d#�d$��Z�ej9e�e!jуd2��d%�d&��Z�ej9�d'd҄ej3j�D�d2��d(�d)��Z�ej9d�d*d*�gd2��d+�d,��Z�dS(2a�
This file is very long and growing, but it was decided to not split it yet, as
it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989

Instead of splitting it was decided to define sections here:
- Configuration / Settings
- Autouse fixtures
- Common arguments
- Missing values & co.
- Classes
- Indices
- Series'
- DataFrames
- Operators & Operations
- Data sets/files
- Time zones
- Dtypes
- Misc
�)�abc)�date�time�	timedelta�timezone)�DecimalN)�tzlocal�tzutc)�
strategies)�FixedOffset�utc)�	DataFrame)�ops)�Index�
MultiIndexcCsL|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�dS)N�markersz&single: mark a test as single cpu onlyzslow: mark a test as slowznetwork: mark a test as networkz2db: tests requiring a database (mysql or postgres)z.high_memory: mark a test as a high-memory onlyz(clipboard: mark a pd.read_clipboard test)Zaddinivalue_line)�config�r�1/tmp/pip-build-5_djhm0z/pandas/pandas/conftest.py�pytest_configure/srcCsd|jdddd�|jdddd�|jdddd�|jd	dd
d�|jdddd�|jd
ddd�dS)Nz--skip-slow�
store_truezskip slow tests)�action�helpz--skip-networkzskip network testsz	--skip-dbz
skip db testsz--run-high-memoryzrun high memory testsz--only-slowzrun only slow testsz--strict-data-filesz0Fail if a test is skipped for missing data file.)Z	addoption)�parserrrr�pytest_addoption<srcCs�d|jkr |jjd�r tjd�d|jkr@|jjd�r@tjd�d|jkr`|jjd�r`tjd�d	|jkr�|jjd
�r�tjd�d|jkr�|jjd
�r�tjd�dS)NZslowz--skip-slowzskipping due to --skip-slowz--only-slowzskipping due to --only-slow�networkz--skip-networkzskipping due to --skip-network�dbz	--skip-dbzskipping due to --skip-dbZhigh_memoryz--run-high-memoryz=skipping high memory test since --run-high-memory was not set)�keywordsr�	getoption�pytest�skip)�itemrrr�pytest_runtest_setupKs



r"Zcii�)�deadlineZsuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEnd�c)�n�	normalizez%YearBegin YearEnd BYearBegin BYearEnd���)Z	min_valueZ	max_value)r%r&�monthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEnd�)r%r&Z
startingMonthT)ZautousecCstjdd�dS)z<
    Configure settings for all tests and test modules.
    Zchained_assignment�raiseN)�pdZ
set_optionrrrr�configure_tests�sr.cCst|d<t|d<dS)z:
    Make `np` and `pd` names available for doctests.
    �npr-N)r/r-)Zdoctest_namespacerrr�add_imports�sr0�index�columnscCsdt|���S)Nzaxis )�repr)�xrrr�<lambda>�sr5)�params�idscCs|jS)z@
    Fixture for returning the axis numbers of a DataFrame.
    )�param)�requestrrr�axis�sr:cCsdt|���S)Nzaxis )r3)r4rrrr5�scCs|jS)z=
    Fixture for returning the axis numbers of a Series.
    )r8)r9rrr�axis_series�sr;F)r6cCs|jS)a�
    Pass in the observed keyword to groupby for [True, False]
    This indicates whether categoricals should return values for
    values which are not in the grouper [False / None], or only values which
    appear in the grouper [True]. [None] is supported for future compatibility
    if we decide to change the default (and would need to warn if this
    parameter is not passed).
    )r8)r9rrr�observed�s
r<cCs|jS)z6
    Boolean 'ordered' parameter for Categorical.
    )r8)r9rrr�ordered�sr=�first�lastcCs|jS)z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    )r8)r9rrr�keep�sr@�left�rightZbothZneithercCs|jS)z<
    Fixture for trying all interval closed parameters.
    )r8)r9rrr�closed�srCcCs|jS)zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    )r8)r9rrr�other_closed�srD�gzip�bz2�zip�xzcCs|jS)zK
    Fixture for trying common compression types in compression tests.
    )r8)r9rrr�compression�srIcCs|jS)zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    )r8)r9rrr�compression_only�srJcCs|jS)z,
    Fixture that an array is writable.
    )r8)r9rrr�writable�srK�inner�outercCs|jS)z:
    Fixture for trying all types of join operations.
    )r8)r9rrr�	join_type�srN�nlargest�	nsmallestcCs|jS)z1
    Fixture for trying all nselect methods.
    )r8)r9rrr�nselect_methodsrQ�nancCs|jS)z/
    Fixture for each null type in pandas.
    )r8)r9rrr�
nulls_fixturesrScCs|jS)zL
    Fixture for each null type in pandas, each null type exactly once.
    )r8)r9rrr�unique_nulls_fixturesrT�seriescCs|jS)z�
    Fixture to parametrize over Index and Series, made necessary by a mypy
    bug, giving an error:

    List item 0 has incompatible type "Type[Series]"; expected "Type[PandasObject]"

    See GH#29725
    )r8)r9rrr�index_or_series*s
rVcCsGdd�dt�}|S)z,
    Fixture for a dictionary subclass.
    c@seZdZdd�ZdS)z"dict_subclass.<locals>.TestSubDictc_stj|f|�|�dS)N)�dict�__init__)�self�args�kwargsrrrrXBsz+dict_subclass.<locals>.TestSubDict.__init__N)�__name__�
__module__�__qualname__rXrrrr�TestSubDictAsr_)rW)r_rrr�
dict_subclass;sr`cCsGdd�dtj�}|S)z8
    Fixture for a non-mapping dictionary subclass.
    c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
z5non_dict_mapping_subclass.<locals>.TestNonDictMappingcSs
||_dS)N)�_data)rYZunderlying_dictrrrrXOsz>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__cSs|jj|�S)N)ra�__getitem__)rY�keyrrrrbRszAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__cSs
|jj�S)N)ra�__iter__)rYrrrrdUsz>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__cSs
|jj�S)N)ra�__len__)rYrrrreXsz=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__N)r\r]r^rXrbrdrerrrr�TestNonDictMappingNsrf)r�Mapping)rfrrr�non_dict_mapping_subclassHs
rhcCsbtjd�}|jdd�dd�dd�g�j�}|jjdd�|jjD�dd	�|jjd
ddgdd	�|S)
z�
    DataFrame with 3 level MultiIndex (year, month, day) covering
    first 100 business days from 2000-01-01 with random data
    �dcSs|jS)N)�year)r4rrrr5hszAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>cSs|jS)N)r*)r4rrrr5hscSs|jS)N)�day)r4rrrr5hscSsg|]}|jd��qS)�i8)�astype)�.0Zlevrrr�
<listcomp>jszCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>T)Zinplacerjr*rk)�tmZmakeTimeDataFrame�groupby�sumr1Z
set_levels�levelsZ	set_names)ZtdfZymdrrr�/multiindex_year_month_day_dataframe_random_dataas

 rtcCsltddddg�}tddg�}tjdddd	d
d
g�}tjddddddg�}ddg}t||g||g|d
d�}|S)zJ
    MultiIndex used to test the general functionality of this object
    �foo�bar�bazZqux�one�tworr(��r>�secondF)rs�codes�namesZverify_integrity)rr/�arrayr)Z
major_axisZ
minor_axisZmajor_codesZminor_codesZindex_names�mirrr�_create_multiindexosr�cCs.tjddgddgtjdddd�gd	d
dgd�S)
zB
    MultiIndex with a level that is a tzaware DatetimeIndex.
    r(rz�a�b�20130101r{z
US/Eastern)Zperiods�tzrxryZthree)r~)rZfrom_productr-Z
date_rangerrrr�_create_mi_with_dt64tz_level�sr�riz
US/Pacific)r��
rurvrwrzr{)�unicode�string�datetimezdatetime-tz�periodr�intZuint�range�float�boolZcategorical�interval�emptyZtupleszmi-with-dt64tz-levelZmultiZrepeatscCst|jj�S)z�
    Fixture for many "simple" kinds of indices.

    These indices are unlikely to cover corner cases, e.g.
        - no names
        - no NaTs/NaNs
        - no values near implementation bounds
        - ...
    )�indices_dictr8�copy)r9rrrr1�scCstjggtjd�S)N)r1�dtype)r-�Seriesr/Zfloat64rrrr�empty_series�sr�cCstj�}d|_|S)zC
    Fixture for Series of floats with Index of unique strings
    rU)rpZmakeStringSeries�name)�srrr�
string_series�sr�cCstj�}d|_|S)zI
    Fixture for Series of dtype object with Index of unique strings
    Zobjects)rpZmakeObjectSeriesr�)r�rrr�
object_series�sr�cCstj�}d|_|S)z9
    Fixture for Series of floats with DatetimeIndex
    �ts)rpZmakeTimeSeriesr�)r�rrr�datetime_series�sr�cCs$t|�}tjj|�}tj||dd�S)z Helper for the _series dict r�)r1r�)�lenr/�randomZrandnr-r�)r1�size�datarrr�_create_series�sr�cCs"i|]\}}t|�d|�d��qS)zseries-with-z-index)r�)rnZindex_idr1rrr�
<dictcomp>�sr�cCst|�S)zE
    Fixture for tests on series with changing types of indices.
    )r�)r1rrr�series_with_simple_index�sr�cCs(i|] }tjdd�j|�|j�d��qS)r�)r�z-series)rpZmakeFloatSeriesrmr\)rnr�rrrr��scCst|jj�S)z:
    Fixture for Series with low precision data types
    )�_narrow_seriesr8r�)r9rrr�
narrow_seriessr�cCst|jjdd�S)z|
    Fixture for tests on indexes, series and series with a narrow dtype
    copy to avoid mutation, e.g. setting .name
    T)�deep)�_index_or_series_objsr8r�)r9rrr�index_or_series_objsr�cCst�S)N)r
rrrr�empty_framesr�cCsttj��jd�S)a6
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']

                A  B  C  D
    vpBeWjM651  1  0  1  0
    5JyxmrP1En -1  0  0  0
    qEDaoD49U2 -1  1  0  0
    m66TkTfsFe  0  0  0  0
    EHPaNzEUFm -1  0 -1  0
    fpRJCevQhi  2  0  0  0
    OlQvnmfi3Q  0  0 -2  0
    ...        .. .. .. ..
    uB1FPlz4uP  0  0  0  1
    EcSe6yNzCU  0  0 -1  0
    L50VudaiI8 -1  1 -2  0
    y3bpw4nwIp  0 -1  0  0
    H0RdLLwrCT  1  1  0  0
    rY82K0vMwm  0  0  0  0
    1OPIUjnkjk  2  0  0  0

    [30 rows x 4 columns]
    Zint64)r
rp�
getSeriesDatarmrrrr�	int_frame sr�cCsttj��S)a�
    Fixture for DataFrame of floats with DatetimeIndex

    Columns are ['A', 'B', 'C', 'D']

                       A         B         C         D
    2000-01-03 -1.122153  0.468535  0.122226  1.693711
    2000-01-04  0.189378  0.486100  0.007864 -1.216052
    2000-01-05  0.041401 -0.835752 -0.035279 -0.414357
    2000-01-06  0.430050  0.894352  0.090719  0.036939
    2000-01-07 -0.620982 -0.668211 -0.706153  1.466335
    2000-01-10 -0.752633  0.328434 -0.815325  0.699674
    2000-01-11 -2.236969  0.615737 -0.829076 -1.196106
    ...              ...       ...       ...       ...
    2000-02-03  1.642618 -0.579288  0.046005  1.385249
    2000-02-04 -0.544873 -1.160962 -0.284071 -1.418351
    2000-02-07 -2.656149 -0.601387  1.410148  0.444150
    2000-02-08 -1.201881 -1.289040  0.772992 -1.445300
    2000-02-09  1.377373  0.398619  1.008453 -0.928207
    2000-02-10  0.473194 -0.636677  0.984058  0.511519
    2000-02-11 -0.965556  0.408313 -1.312844 -0.381948

    [30 rows x 4 columns]
    )r
rpZgetTimeSeriesDatarrrr�datetime_frame=sr�cCsttj��S)a�
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].

                       A         B         C         D
    P7GACiRnxd -0.465578 -0.361863  0.886172 -0.053465
    qZKh6afn8n -0.466693 -0.373773  0.266873  1.673901
    tkp0r6Qble  0.148691 -0.059051  0.174817  1.598433
    wP70WOCtv8  0.133045 -0.581994 -0.992240  0.261651
    M2AeYQMnCz -1.207959 -0.185775  0.588206  0.563938
    QEPzyGDYDo -0.381843 -0.758281  0.502575 -0.565053
    r78Jwns6dn -0.653707  0.883127  0.682199  0.206159
    ...              ...       ...       ...       ...
    IHEGx9NO0T -0.277360  0.113021 -1.018314  0.196316
    lPMj8K27FA -1.313667 -0.604776 -1.305618 -0.863999
    qa66YMWQa5  1.110525  0.475310 -0.747865  0.032121
    yOa0ATsmcE -0.431457  0.067094  0.096567 -0.264962
    65znX3uRNG  1.528446  0.160416 -0.109635 -0.032987
    eCOBvKqf3e  0.235281  1.622222  0.781255  0.392871
    xSucinXxuV -1.263557  0.252799 -0.552247  0.400426

    [30 rows x 4 columns]
    )r
rpr�rrrr�float_frameZsr��__add__�__radd__�__sub__�__rsub__�__mul__�__rmul__�__floordiv__�
__rfloordiv__�__truediv__�__rtruediv__�__pow__�__rpow__�__mod__�__rmod__cCs|jS)zD
    Fixture for dunder names for common arithmetic operations.
    )r8)r9rrr�all_arithmetic_operators�sr�cCs|jS)z�
    Fixture for operator and roperator arithmetic functions.

    Notes
    -----
    This includes divmod and rdivmod, whereas all_arithmetic_operators
    does not.
    )r8)r9rrr�all_arithmetic_functions�sr�rr�max�minZmean�prodZstd�varZmedianZkurtZskewcCs|jS)z.
    Fixture for numeric reduction names.
    )r8)r9rrr�all_numeric_reductions�sr��all�anycCs|jS)z.
    Fixture for boolean reduction names.
    )r8)r9rrr�all_boolean_reductions�sr�cCs|jS)z>
    Fixture for all (boolean + numeric) reduction names.
    )r8)r9rrr�all_reductions�sr��__eq__�__ne__�__le__�__lt__�__ge__�__gt__cCs|jS)zu
    Fixture for dunder names for common compare operations

    * >=
    * >
    * ==
    * !=
    * <
    * <=
    )r8)r9rrr�all_compare_operators�sr�cCs|jS)zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    )r8)r9rrr�compare_operators_no_eq_ne�s
r��__and__�__rand__�__or__�__ror__�__xor__�__rxor__cCs|jS)zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    )r8)r9rrr�all_logical_operators�sr�cCs
|jd�S)zO
    Returns the configuration for the test setting `--strict-data-files`.
    z--strict-data-files)r)Zpytestconfigrrr�strict_data_filessr�cs(tjjtjjt�d����fdd�}|S)a=
    Get the path to a data file.

    Parameters
    ----------
    path : str
        Path to the file, relative to ``pandas/tests/``

    Returns
    -------
    path including ``pandas/tests``.

    Raises
    ------
    ValueError
        If the path doesn't exist and the --strict-data-files option is set.
    �testscsJtjj�f|��}tjj|�sF�r4td|�d���ntjd|�d��|S)NzCould not find file z  and --strict-data-files is set.zCould not find �.)�os�path�join�exists�
ValueErrorrr )rZr�)�	BASE_PATHr�rr�deco(szdatapath.<locals>.deco)r�r�r��dirname�__file__)r�r�r)r�r�r�datapathsr�cCstj|dddd��S)z*
    The iris dataset as a DataFrame.
    �ior��csvziris.csv)r-Zread_csv)r�rrr�iris6sr��UTCz
US/Easternz
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporei,)�hours)r�cCsg|]}t|��qSr)r3)rn�irrrroQsrocCs|jS)zD
    Fixture for trying timezones including default (None): {0}
    )r8)r9rrr�tz_naive_fixtureTsr�cCs|jS)z4
    Fixture for trying explicit timezones: {0}
    )r8)r9rrr�tz_aware_fixture]sr��module)ZscopecCstjS)zB
    Yields the UTC timezone object from the datetime module.
    )rrrrrr�datetime_tz_utcjsr�rzdateutil/UTCcCs|jS)zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    )r8)r9rrr�utc_fixturersr�cCs|jS)zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    )r8)r9rrr�string_dtype}s	r�cCs|jS)zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    )r8)r9rrr�bytes_dtype�sr�cCs|jS)zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    )r8)r9rrr�object_dtype�sr�cCs|jS)z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    )r8)r9rrr�datetime64_dtype�sr�cCs|jS)z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    )r8)r9rrr�timedelta64_dtype�sr�cCs|jS)z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    )r8)r9rrr�float_dtype�s	r�cCs|jS)zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    )r8)r9rrr�
complex_dtype�s	r�cCs|jS)z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    )r8)r9rrr�
sint_dtype�sr�cCs|jS)zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    )r8)r9rrr�
uint_dtype�s
r�cCs|jS)z�
    Parameterized fixture for any integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    )r8)r9rrr�
any_int_dtype�sr�cCs|jS)z�
    Parameterized fixture for any nullable integer dtype.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    )r8)r9rrr�any_nullable_int_dtype�sr�cCs|jS)z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    )r8)r9rrr�any_signed_nullable_int_dtypes
r�cCs|jS)z�
    Parameterized fixture for any (purely) real numeric dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    )r8)r9rrr�any_real_dtypesr�cCs|jS)a�
    Parameterized fixture for all numpy dtypes.

    * bool
    * 'bool'
    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    * complex
    * 'complex64'
    * 'complex128'
    * str
    * 'str'
    * 'U'
    * bytes
    * 'bytes'
    * 'datetime64[ns]'
    * 'M8[ns]'
    * 'timedelta64[ns]'
    * 'm8[ns]'
    * object
    * 'object'
    )r8)r9rrr�any_numpy_dtype-s"r�r�r��c�bytes�a�cr�z
mixed-integer�mixedg@Zfloatingg�?�integerzmixed-integer-float�decimal�boolean�
datetime64z
2013-01-01z
2018-01-01r�r�Z20180101ri�i�rrr�r�cCs |j\}}tj|td�}||fS)a�
    Fixture for all inferred dtypes from _libs.lib.infer_dtype

    The covered (inferred) types are:
    * 'string'
    * 'empty'
    * 'bytes'
    * 'mixed'
    * 'mixed-integer'
    * 'mixed-integer-float'
    * 'floating'
    * 'integer'
    * 'decimal'
    * 'boolean'
    * 'datetime64'
    * 'datetime'
    * 'date'
    * 'timedelta'
    * 'time'
    * 'period'
    * 'interval'

    Returns
    -------
    inferred_dtype : str
        The string for the inferred dtype from _libs.lib.infer_dtype
    values : np.ndarray
        An array of object dtype that will be inferred to have
        `inferred_dtype`

    Examples
    --------
    >>> import pandas._libs.lib as lib
    >>>
    >>> def test_something(any_skipna_inferred_dtype):
    ...     inferred_dtype, values = any_skipna_inferred_dtype
    ...     # will pass
    ...     assert lib.infer_dtype(values, skipna=True) == inferred_dtype
    )r�)r8r/r�object)r9Zinferred_dtype�valuesrrr�any_skipna_inferred_dtypeps)
rcCs tjddd�ddlm}|�S)zj
    Get an instance of IPython.InteractiveShell.

    Will raise a skip if IPython is not installed.
    ZIPythonz6.0.0)Z
minversionr)�InteractiveShell)rZimportorskipZIPython.core.interactiveshellr)rrrr�ip�sr	ZbsrZcooZcscZcsrZdiaZdokZlilcCsddlm}t||jd�S)z-
    Yields scipy sparse matrix classes.
    r)�sparseZ_matrix)Zscipyr
�getattrr8)r9r
rrr�spmatrix�srcCs|jS)z�
    Yields a tuple of a function and its corresponding name. Correspond to
    the list of aggregator "Cython functions" used on selected table items.
    )r8)r9rrr�cython_table_items�sr
cCs.g|]&}tttj|�tjj�rttj|��qSr)�
issubclassrr-�offsetsZTick)rn�orrrro�scCs|jS)zN
    Fixture for Tick based datetime offsets available for a time series.
    )r8)r9rrr�tick_classes�srcCs|S)Nr)r4rrrr5�scCs|jS)zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    )r8)r9rrr�sort_by_key�sri�������i��i������)��__doc__�collectionsrr�rrrrrr�operatorr�Zdateutil.tzrr	Z
hypothesisr
�stZnumpyr/rZpytzrrZpandas.util._test_decorators�utilZ_test_decorators�tdZpandasr-r
Zpandas._testingZ_testingrpZpandas.corerZpandas.core.indexes.apirrrrr"�settingsZregister_profileZHealthCheckZtoo_slowZload_profile�splitr�rZtseriesr�clsZregister_type_strategyZbuildsZintegersZbooleansZfixturer.r0r:Z
axis_framer;r<r=r@rCrDrIrJrKrNrQrRZNaTr�ZNA�strrSZnulls_fixture2rTZunique_nulls_fixture2r�rVZindex_or_series2r`rhrtr�r�ZmakeUnicodeIndexZmakeStringIndexZ
makeDateIndexZmakePeriodIndexZmakeTimedeltaIndexZmakeIntIndexZ
makeUIntIndexZmakeRangeIndexZmakeFloatIndexZ
makeBoolIndexZmakeCategoricalIndexZmakeIntervalIndex�from_tuplesrGr��keysr1Zindex_fixture2r�r�r�r�r��itemsZ_seriesr�Zfloat16Zfloat32Zint8Zint16Zint32Zuint8Zuint16Zuint32Z_narrow_dtypesr�r�r�r�r�r�r�r�Z_all_arithmetic_operatorsr��addZradd�subZrsub�mulZrmul�truedivZrtruediv�floordivZ	rfloordiv�modZrmod�powZrpowr�Z_all_numeric_reductionsr�Z_all_boolean_reductionsr�Z_all_reductionsr�r�r�r�r�r�r�Z	TIMEZONESZTIMEZONE_IDSZparametrize_fixture_docr�r�Ztz_aware_fixture2r�r�Z
STRING_DTYPESr�ZBYTES_DTYPESr�Z
OBJECT_DTYPESr�ZDATETIME64_DTYPESr�ZTIMEDELTA64_DTYPESr�ZFLOAT_DTYPESr�ZCOMPLEX_DTYPESr�ZSIGNED_INT_DTYPESr�ZUNSIGNED_INT_DTYPESr�ZALL_INT_DTYPESr�ZALL_EA_INT_DTYPESr�ZSIGNED_EA_INT_DTYPESr�ZALL_REAL_DTYPESr�ZALL_NUMPY_DTYPESr�rZ	TimestampZPeriodZIntervalZ_any_skipna_inferred_dtyper7�_rr	r�listZcython_tabler
�__all__rrrrrr�<module>s�

("
		*	"



		
! 
#(	"

'  $ $3
4