
    .i                        d dl Z d dlZd dlmZmZmZmZmZmZm	Z	 d dl
Zd dlmZ ej                  j!                  dg d      d        Zd Zej                  j!                  ddd	g      d
        Z G d d      Zd Zej                  j!                  deefeefeefeefg      d        Zej                  j!                  deefeefeefeefg      d        Zy)    N)AbstractMethodErrorPandas4WarningPandas5WarningPandasChangeWarningPandasDeprecationWarningPandasPendingDeprecationWarningUndefinedVariableErrorexc)AttributeConflictWarning
CSSWarningCategoricalConversionWarningClosedFileError	DataErrorDatabaseErrorDtypeWarningEmptyDataErrorIncompatibilityWarningIndexingErrorInvalidColumnNameInvalidComparisonInvalidVersionLossySetitemError
MergeErrorNoBufferPresentNumExprClobberingErrorNumbaUtilErrorOptionErrorOutOfBoundsDatetimeParserErrorParserWarningPerformanceWarningPossibleDataLossErrorPossiblePrecisionLossPyperclipExceptionSpecificationErrorUnsortedIndexErrorUnsupportedFunctionCallValueLabelTypeMismatchc                     ddl m} t        ||       }|J d}t        j                  ||      5   |       # 1 sw Y   y xY w)Nr   errorsz^$match)pandasr+   getattrpytestraises)r
   r+   errmsgs       V/var/www/app/trading-bot/venv/lib/python3.12/site-packages/pandas/tests/test_errors.pytest_exception_importabler5      sJ    H 
&#
C?? C	s#	& e s	   8Ac                      ddl m}  d}t        j                  | j                  |      5  t        j                  d      j                  d       d d d        y # 1 sw Y   y xY w)Nr   r*   z=Cannot cast 1500-01-01 00:00:00 to unit='ns' without overflowr,   15000101ns)r.   r+   r0   r1   r   pd	Timestampas_unit)r+   r3   s     r4   test_catch_oobr<   D   sJ    
IC	v11	= /
Z ((./ / /s   %AA!is_localTFc                     d}| rd| d}nd| d}t        j                  t        |      5  t        ||       # 1 sw Y   y xY w)Nxzlocal variable 'z' is not definedzname 'r,   )r0   r1   r	   )r=   variable_namer3   s      r4   #test_catch_undefined_variable_errorrA   L   sT    M /?@}o%56	-S	9 >$]H==> >s	   :Ac                   2    e Zd Zed        Zed        Zd Zy)Fooc                     t        | d      )Nclassmethod
methodtyper   )clss    r4   rE   zFoo.classmethodY   s    !#-@@    c                     t        | d      )NpropertyrF   rH   selfs    r4   rL   zFoo.property]   s    !$:>>rJ   c                     t        |       )NrH   rM   s    r4   methodz
Foo.methoda   s    !$''rJ   N)__name__
__module____qualname__rE   rL   rP    rJ   r4   rC   rC   X   s/    A A ? ?(rJ   rC   c                     d} t        j                  t        |       5  t        j	                          d d d        d} t        j                  t        |       5  t               j
                   d d d        d} t        j                  t        |       5  t               j                          d d d        y # 1 sw Y   xY w# 1 sw Y   TxY w# 1 sw Y   y xY w)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)r0   r1   r   rC   rE   rL   rP   )xprs    r4   $test_AbstractMethodError_classmethodrW   e   s    
FC	*#	6  DC	*#	6  BC	*#	6     s#   B4C C4B= C	Czwarn_category, catch_categoryc                     t        j                  |      5  t        j                  d|        d d d        y # 1 sw Y   y xY w)Ntestcategory)tmassert_produces_warningwarningswarn)warn_categorycatch_categorys     r4   test_pandas_warningsrb   s   s5     
	#	#N	3 6f}56 6 6s	   7A zwarn_category, filter_categoryc                    t        j                  d       5  t        j                         5  t        j                  |d       t        j
                  d|        d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nignore)r[   actionrY   rZ   )r\   r]   r^   catch_warningsfilterwarningsr_   )r`   filter_categorys     r4   test_pandas_warnings_filterri      se     
	#	#D	) 68+B+B+D 6Jf}56 6 6 6 6 6s"   A7/A+A7+A4	0A77B )r^   r0   pandas.errorsr   r   r   r   r   r   r	   r.   r9   pandas._testing_testingr\   markparametrizer5   r<   rA   rC   rW   rb   ri   rT   rJ   r4   <module>ro      s+         	"FG"F/ dE]3> 4>
( 
( #	,-	12	,-	89	66 $	,-	12	,-	89	66rJ   