o
    i                      @  s   d dl mZ d dlZd dl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dd	 Zd
d Zdd 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 urt t|t| }t |}t|| d S )Nc                 s  s&    | ]}| d s|dkr|V  qdS )__r   N)
startswith).0f r	   T/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/pandas/tests/api/test_api.py	<genexpr>   s    
zBase.check.<locals>.<genexpr>)sorteddirsettm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 g dZg dZg dZddgZded< g dZg d	Z	g d
Z
ded< dgZded< g Zded< g dZg dZg dZdgZg dZg Zded< g Zded< g dZdd Zdd Zdd ZdS )	TestPDApi)testslocaleconftest)	r   arraysoptionstesttestingerrorsplottingiotseries)compatcorepandasutilnpdatetimez	list[str]deprecated_modules)
IndexSliceNaTNA)+
ArrowDtypeCategoricalCategoricalIndex	DataFrame
DateOffsetDatetimeIndex	ExcelFileExcelWriterFloat64IndexFlagsGrouperHDFStoreIndex
Int64Index
MultiIndexPeriodPeriodIndex
RangeIndexUInt64IndexSeriesSparseDtypeStringDtype	TimedeltaTimedeltaIndex	TimestampIntervalIntervalIndexCategoricalDtypePeriodDtypeIntervalDtypeDatetimeTZDtypeBooleanDtype	Int8Dtype
Int16Dtype
Int32Dtype
Int64Dtype
UInt8DtypeUInt16DtypeUInt32DtypeUInt64DtypeFloat32DtypeFloat64DtypeNamedAgg)r9   r>   rC   deprecated_classesSparseArraydeprecated_classes_in_futuremodules)arraybdate_rangeconcatcrosstabcut
date_rangeinterval_rangeeval	factorizeget_dummiesfrom_dummies
infer_freqisnaisnulllreshapemeltnotnanotnulloffsetsmergemerge_ordered
merge_asofperiod_rangepivotpivot_tableqcutshow_versionstimedelta_rangeuniquevalue_countswide_to_long)reset_optiondescribe_option
get_optionoption_context
set_optionset_eng_float_format)read_clipboardread_csv
read_excelread_fwfread_gbqread_hdf	read_htmlread_xml	read_jsonread_pickleread_sasread_sqlread_sql_queryread_sql_table
read_stata
read_tableread_featherread_parquetread_orc	read_spssjson_normalize)to_datetime
to_numeric	to_pickleto_timedeltadeprecated_funcs_in_futuredeprecated_funcs)_config_libs_is_numpy_dev_testing_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   
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/J || }|r7J d S r   )r   r   r   r_   r   r   r   r   r   r   r\   r   __all__)r   r   actual
extraneousmissingr	   r	   r
   test_api_all   s4   

zTestPDApi.test_api_allc              	   C  s`   | j | j | j | j | j }|D ]}tt tt	|}W d    n1 s(w   Y  qd S r   )
r-   r\   r^   r   r   r   assert_produces_warningFutureWarninggetattrr   )r   deprecated_listdepr_r	   r	   r
   	test_depr   s    zTestPDApi.test_deprN)r   r   r   r   r   r   r-   __annotations__r   r   r\   r^   r_   r   r   r   r   r   r   r   r   r   r   r   r	   r	   r	   r
   r      s*   
 /#
	r   c                  C  s   ddl m }  dd l}| . |dt | ddddd| dddddks'J t| ddddd| s4J W d    d S 1 s?w   Y  d S )Nr   )r,   ignorei        )r,   warningscatch_warningssimplefilterr   
isinstance)r,   r   r	   r	   r
   test_datetime   s   
$"r   c                  C  s`   dd l } |   | dt ttjg dddtjsJ W d    d S 1 s)w   Y  d S )Nr   r   )r   r      Sparse)dtype)r   r   r   r   r   r   r`   r]   )r   r	   r	   r
   test_sparsearray  s
   
 "r   c                  C  sl   dd l } dd l}|    | dt tjdd|ddk s$J W d    d S 1 s/w   Y  d S )Nr   r   
   )	r   numpyr   r   r   r   r+   arangeall)r   r+   r	   r	   r
   test_np  s   
$"r   c                   @  s   e Zd Zg dZdd ZdS )TestApi)types
extensionsindexersinterchangec                 C  s   |  t| j d S r   )r   r   allowed)r   r	   r	   r
   r     s   zTestApi.test_apiN)r   r   r   r   r   r	   r	   r	   r
   r     s    r   c                   @  s4   e Zd Zg dZdd Zdd Zdd Zdd	 Zd
S )TestTesting)assert_frame_equalassert_series_equalassert_index_equal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  sp   t jdd  tt}dd l}W d    n1 sw   Y  dt|d jv s+J dt|d jv s6J d S )Npandas.util.testingr   !pandas.util.testing is deprecatedpandas.testing instead)	sysr_   popr   r   r   pandas.util.testingstrmessage)r   mr)   r	   r	   r
   test_util_testing_deprecated,  s   
z(TestTesting.test_util_testing_deprecatedc                 C  st   t jdd  tt}ddlm} W d    n1 sw   Y  dt|d j	v s-J dt|d j	v s8J d S )Nr   r   )r   r   r   )
r   r_   r   r   r   r   r   r   r   r   )r   r   r   r	   r	   r
   #test_util_testing_deprecated_direct6  s   z/TestTesting.test_util_testing_deprecated_directc                 C  sd   t jtjddgt jd }d|v sJ tjtdd t	j
j W d    d S 1 s+w   Y  d S )Nz-cz6import pandas; pandas.util.testing.assert_series_equal)stderrr   foo)match)
subprocesscheck_outputr   
executableSTDOUTdecodepytestraisesAttributeErrorr   r*   r   )r   outr	   r	   r
   test_util_in_top_level?  s   
"z"TestTesting.test_util_in_top_levelN)r   r   r   r   r   r   r   r   r	   r	   r	   r
   r     s    
	r   )
__future__r   r   r   r   r)   r   r   pandas._testingr   r   r   r   r   r   r   r   r   r	   r	   r	   r
   <module>   s     _
