a
    Of
                     @   sv   d dl Z d dlmZmZ d dlZe jdg ddd Zdd Z	e jd	d
dgdd Z
G dd dZdd ZdS )    N)AbstractMethodErrorUndefinedVariableErrorexc) ZAttributeConflictWarningZ
CSSWarningZCategoricalConversionWarningZClosedFileErrorZ	DataErrorZDatabaseErrorZDtypeWarningZEmptyDataErrorZIncompatibilityWarningZIndexingErrorZInvalidColumnNameZInvalidComparisonInvalidVersionZLossySetitemErrorZ
MergeErrorZNoBufferPresentZNumExprClobberingErrorZNumbaUtilErrorOptionErrorOutOfBoundsDatetimeZParserErrorZParserWarningZPerformanceWarningZPossibleDataLossErrorZPossiblePrecisionLossZPyperclipExceptionZSettingWithCopyErrorZSettingWithCopyWarningZSpecificationErrorZUnsortedIndexErrorZUnsupportedFunctionCallZValueLabelTypeMismatchc                 C   s^   ddl m} t|| }|d us"J d}tj||d | W d    n1 sP0    Y  d S )Nr   errorsz^$match)pandasr	   getattrpytestraises)r   r	   errmsg r   Q/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/test_errors.pytest_exception_importable   s    &
r   c                  C   sT   ddl m}  d}tj| j|d  tdd W d    n1 sF0    Y  d S )Nr   r   z=Cannot cast 1500-01-01 00:00:00 to unit='ns' without overflowr
   Z15000101ns)r   r	   r   r   r   pd	TimestampZas_unit)r	   r   r   r   r   test_catch_oob>   s    r   is_localTFc                 C   s^   d}| rd| d}nd| d}t jt|d t|| W d    n1 sP0    Y  d S )Nxzlocal variable 'z' is not definedzname 'r
   )r   r   r   )r   Zvariable_namer   r   r   r   #test_catch_undefined_variable_errorF   s    r   c                   @   s,   e Zd Zedd Zedd Zdd ZdS )Fooc                 C   s   t | ddd S )NclassmethodZ
methodtyper   )clsr   r   r   r   Y   s    zFoo.classmethodc                 C   s   t | ddd S )Npropertyr   r   selfr   r   r   r!   ]   s    zFoo.propertyc                 C   s   t | d S )Nr   r"   r   r   r   methoda   s    z
Foo.methodN)__name__
__module____qualname__r   r!   r$   r   r   r   r   r   X   s
   

r   c                  C   s   d} t jt| d t  W d    n1 s00    Y  d} t jt| d t j W d    n1 sj0    Y  d} t jt| d t   W d    n1 s0    Y  d S )Nz:This classmethod must be defined in the concrete class Foor
   z7This property must be defined in the concrete class Fooz5This method must be defined in the concrete class Foo)r   r   r   r   r   r!   r$   )Zxprr   r   r   $test_AbstractMethodError_classmethode   s    &&r(   )r   Zpandas.errorsr   r   r   r   markZparametrizer   r   r   r   r(   r   r   r   r   <module>   s"   %

