o
    _~#g$                     @  s   d dl mZ d dlZd dlZd dlmZ d dlmZ d dl	m
ZmZmZmZ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d ZdS )    )annotationsN)api)
extensionsindexersinterchangetypestypingc                   @  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   ~/var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/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g dZg dZ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ejsPed dd Zdd Zdd ZdS )	TestPDApi)testslocaleconftest_version_meson)	r   arraysoptionstesttestingerrorsplottingiotseries)compatcorepandasutil_built_with_meson)
IndexSliceNaTNA)(
ArrowDtypeCategoricalCategoricalIndex	DataFrame
DateOffsetDatetimeIndex	ExcelFileExcelWriterFlagsGrouperHDFStoreIndex
MultiIndexPeriodPeriodIndex
RangeIndexSeriesSparseDtypeStringDtype	TimedeltaTimedeltaIndex	TimestampIntervalIntervalIndexCategoricalDtypePeriodDtypeIntervalDtypeDatetimeTZDtypeBooleanDtype	Int8Dtype
Int16Dtype
Int32Dtype
Int64Dtype
UInt8DtypeUInt16DtypeUInt32DtypeUInt64DtypeFloat32DtypeFloat64DtypeNamedAggz	list[str]deprecated_classes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_pandas_datetime_CAPI_pandas_parser_CAPI_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  sT   | j | j | j }|D ]}tt tt|}W d    n1 s"w   Y  qd S 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   r   r]   __annotations__r^   r   r   r   r   r   r   r   r   r   r1   appendr   r   r   r   r   r   r   r    !   s*   
 ,#
	
r    c                   @  sl   e Zd Zg dZg dZg dZddgZg dZg dZdd	 Z	d
d Z
dd Zdd Zdd Zdd ZdS )TestApi)r   r   r   r   r   )DataFrameGroupByDatetimeIndexResamplerGroupby	ExpandingExpandingGroupbyExponentialMovingWindowExponentialMovingWindowGroupby
JsonReaderNaTTypeNATypePeriodIndexResamplerGroupby	ResamplerRollingRollingGroupbySeriesGroupByStataReaderTimedeltaIndexResamplerGroupbyTimeGrouperWindow).is_any_real_numeric_dtypeis_array_likeis_boolis_bool_dtypeis_categorical_dtype
is_complexis_complex_dtypeis_datetime64_any_dtypeis_datetime64_dtypeis_datetime64_ns_dtypeis_datetime64tz_dtypeis_dict_likeis_dtype_equalis_extension_array_dtypeis_file_likeis_floatis_float_dtypeis_hashableis_int64_dtype
is_integeris_integer_dtypeis_intervalis_interval_dtypeis_iteratoris_list_likeis_named_tuple	is_numberis_numeric_dtypeis_object_dtypeis_period_dtypeis_reis_re_compilable	is_scalaris_signed_integer_dtype	is_sparseis_string_dtypeis_timedelta64_dtypeis_timedelta64_ns_dtypeis_unsigned_integer_dtypepandas_dtypeinfer_dtypeunion_categoricalsrM   rP   rO   rN   from_dataframer8   )check_array_indexerBaseIndexerFixedForwardWindowIndexerVariableOffsetWindowIndexer)	
no_defaultExtensionDtyperegister_extension_dtyperegister_dataframe_accessorregister_index_accessorregister_series_accessortakeExtensionArrayExtensionScalarOpsMixinc                 C     |  t| j d S r   )r   r   allowed_api_dirsr   r   r   r   r   U     zTestApi.test_apic                 C  r  r   )r   
api_typingallowed_typingr  r   r   r   test_api_typingX  r  zTestApi.test_api_typingc                 C  r  r   )r   	api_typesallowed_api_typesr  r   r   r   test_api_types[  r  zTestApi.test_api_typesc                 C  r  r   )r   api_interchangeallowed_api_interchanger  r   r   r   test_api_interchange^  r  zTestApi.test_api_interchangec                 C  r  r   )r   api_indexersallowed_api_indexersr  r   r   r   test_api_indexersa  r  zTestApi.test_api_indexersc                 C  r  r   )r   api_extensionsallowed_api_extensionsr  r   r   r   test_api_extensionsd  r  zTestApi.test_api_extensionsN)r   r   r   r  r  r  r  r  r  r   r  r  r  r  r  r   r   r   r   r      s    0r   c                   @  s$   e Zd Zg 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_testingp  s   zTestTesting.test_testingc                 C  s<   t jtdd tjj W d    d S 1 sw   Y  d S )Nfoomatch)pytestraisesAttributeErrorr   r0   r&  r  r   r   r   test_util_in_top_levelu  s   
"z"TestTesting.test_util_in_top_levelN)r   r   r   r   r%  r,  r   r   r   r   r   h  s    r   c                  C  sN   d} t jt| d tjj}W d    n1 sw   Y  |tjju s%J d S )Nz0PandasArray has been renamed NumpyExtensionArrayr'  )r   r   r   r   r%   PandasArrayNumpyExtensionArray)msgresr   r   r   test_pandas_array_aliasz  s
   
r1  )
__future__r   r)  r/   r   r   pandas._testingr   r   
pandas.apir   r  r   r  r   r  r   r  r   r  r	   r    r   r   r1  r   r   r   r   <module>   s    	 Vr