U
    ¾mœd@  ã                   @  sv   d dl mZ d dlZd dlZd dlmZ d dlmZ G dd„ dƒZ	G dd„ de	ƒZ
G dd	„ d	e	ƒZG d
d„ de	ƒZdS )é    )ÚannotationsN)Úapic                   @  s   e Zd Zddd„ZdS )ÚBaseNc                 C  sJ   t dd„ t|ƒD ƒƒ}|d k	r2t t|ƒt|ƒ ƒ}t |ƒ}t ||¡ d S )Nc                 s  s$   | ]}|  d ¡s|dkr|V  qdS )Ú__r   N)Ú
startswith)Ú.0Úf© r	   úR/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/pandas/tests/api/test_api.pyÚ	<genexpr>   s    
  zBase.check.<locals>.<genexpr>)ÚsortedÚdirÚsetÚtmZassert_almost_equal)ÚselfÚ	namespaceÚexpectedÚignoredÚresultr	   r	   r
   Úcheck   s    ÿz
Base.check)N)Ú__name__Ú
__module__Ú__qualname__r   r	   r	   r	   r
   r   
   s   r   c                (   @  s€  e Zd ZU dddgZdddddd	d
ddg	ZddddgZdddgZddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;g(Zg Zd<e	d=< g Z
d<e	d>< d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]gZd^d_d`dadbdcgZdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwgZdxgZdydzd{d|gZg Zd<e	d}< g Zd<e	d~< dd€d�d‚dƒd„gZd…d†„ Zd‡dˆ„ Zd‰dŠ„ Zd‹S )ŒÚ	TestPDApiÚtestsÚlocaleZconftestr   ZarraysÚoptionsÚtestÚtestingÚerrorsZplottingÚioZtseriesÚcompatÚcoreÚpandasÚutilZ
IndexSliceZNaTZNAZ
ArrowDtypeZCategoricalZCategoricalIndexZ	DataFrameZ
DateOffsetZDatetimeIndexZ	ExcelFileZExcelWriterÚFlagsZGrouperZHDFStoreÚIndexZ
MultiIndexZPeriodZPeriodIndexZ
RangeIndexZSeriesZSparseDtypeZStringDtypeZ	TimedeltaZTimedeltaIndexÚ	TimestampZIntervalZIntervalIndexZCategoricalDtypeZPeriodDtypeZIntervalDtypeZDatetimeTZDtypeZBooleanDtypeZ	Int8DtypeZ
Int16DtypeZ
Int32DtypeZ
Int64DtypeZ
UInt8DtypeZUInt16DtypeZUInt32DtypeZUInt64DtypeZFloat32DtypeZFloat64DtypeZNamedAggz	list[str]Údeprecated_classesÚmodulesÚarrayZbdate_rangeÚconcatZcrosstabÚcutZ
date_rangeZinterval_rangeÚevalZ	factorizeZget_dummiesZfrom_dummiesZ
infer_freqZisnaZisnullZlreshapeZmeltZnotnaZnotnullÚoffsetsÚmergeZmerge_orderedZ
merge_asofZperiod_rangeZpivotZpivot_tableZqcutZshow_versionsZtimedelta_rangeÚuniqueZvalue_countsZwide_to_longZreset_optionZdescribe_optionÚ
get_optionZoption_contextZ
set_optionZset_eng_float_formatZread_clipboardZread_csvZ
read_excelZread_fwfZread_gbqZread_hdfZ	read_htmlZread_xmlÚ	read_jsonZread_pickleZread_sasZread_sqlZread_sql_queryZread_sql_tableZ
read_stataZ
read_tableZread_featherZread_parquetZread_orcZ	read_spssZjson_normalizeÚto_datetimeZ
to_numericZ	to_pickleZto_timedeltaÚdeprecated_funcs_in_futureÚdeprecated_funcsÚ_configZ_libsZ_is_numpy_devÚ_testingZ_typingÚ_versionc                 C  sX   | j | j | j | j | j | j | j | j | j | j	 | j
 }| jt|| jd� d S )N)r   r   r   )Ú
public_libÚprivate_libÚmiscr)   ÚclassesÚfuncsÚfuncs_optionÚ
funcs_readÚ
funcs_jsonÚfuncs_toÚprivate_modulesr   Úpdr   )r   Z
checktheser	   r	   r
   Útest_api½   s.    ÿþýüûúùø	÷
öÿzTestPDApi.test_apic                 C  sr   t | j| j | j | j | j | j | j | j | j	 ƒt | j
ƒ }t tjƒ}|| }|r^t‚|| }|rnt‚d S ©N)r   r9   r;   r)   r<   r=   r>   r?   r@   rA   r(   rC   Ú__all__ÚAssertionError)r   r   ÚactualZ
extraneousÚmissingr	   r	   r
   Útest_api_allÍ   s4    ÿþýüûúùøÿ
ö
zTestPDApi.test_api_allc              
   C  s@   | j | j | j }|D ]$}t t¡� tt|ƒ}W 5 Q R X qd S rE   )r(   r5   r4   r   Zassert_produces_warningÚFutureWarningÚgetattrrC   )r   Zdeprecated_listZdeprÚ_r	   r	   r
   Ú	test_deprá   s    ÿþÿzTestPDApi.test_deprN)r   r   r   r   r9   r:   r;   r<   r(   Ú__annotations__r)   r=   r>   r?   r@   rA   r4   r5   rB   rD   rJ   rN   r	   r	   r	   r
   r      s  

÷
Ø,á$úìú	r   c                   @  s    e Zd ZddddgZdd„ ZdS )ÚTestApiÚtypesÚ
extensionsZindexersZinterchangec                 C  s   |   t| j¡ d S rE   )r   r   Úallowed©r   r	   r	   r
   rD   ï   s    zTestApi.test_apiN)r   r   r   rS   rD   r	   r	   r	   r
   rP   ì   s   rP   c                   @  s(   e Zd ZddddgZdd„ Zdd„ Zd	S )
ÚTestTestingZassert_frame_equalZassert_series_equalZassert_index_equalZassert_extension_array_equalc                 C  s   ddl m} |  || j¡ d S )Nr   )r   )r#   r   r   r=   )r   r   r	   r	   r
   Útest_testingû   s    zTestTesting.test_testingc              	   C  s&   t jtdd�� tjj W 5 Q R X d S )NÚfoo)Úmatch)ÚpytestZraisesÚAttributeErrorrC   r$   rW   rT   r	   r	   r
   Útest_util_in_top_level   s    z"TestTesting.test_util_in_top_levelN)r   r   r   r=   rV   r[   r	   r	   r	   r
   rU   ó   s   ürU   )Ú
__future__r   rY   r#   rC   r   Zpandas._testingr7   r   r   r   rP   rU   r	   r	   r	   r
   Ú<module>   s    S