
    +h	                     f    d dl mZ d dlZddlmZ ddlmZ ddlmZ  G d d	e	      Z
d
 Zd ZddZy)    )absolute_importN   )
assertions   )exc)_warnings_warnc                       e Zd ZdZy)SATestSuiteWarningzwarning for a condition detected during tests that is non-fatal

    Currently outside of SAWarning so that we can work around tools like
    Alembic doing the wrong thing with warnings.

    N)__name__
__module____qualname____doc__     N/var/www/html/venv/lib/python3.12/site-packages/sqlalchemy/testing/warnings.pyr
   r
      s    r   r
   c                 &    t        | t               y )Ncategory)r   r
   )messages    r   warn_test_suiter      s    7%78r   c                     d} t        j                  dt        j                         t        j                  dt        j                         t        j                  dt        j
                         t        j                  dt               t        j                  dt        |        t        j                  dt        d       t        j                  dt        j                  d	       t        j                  dt        j                  d
       	 ddl}t        j                  d|j                  |        y# t        $ r Y yw xY w)z/Set global warning behavior for the test suite.z^(?:test|sqlalchemy)\..*ignorer   erroralways)r   modulezL.*The default (?:date)?(?:time)?(?:stamp)? (adapter|converter) is deprecated)r   r   z.*\(deprecated since: 2.0\)$z8^The (Sybase|firebird) dialect is deprecated and will ber   Nonce)warningsfilterwarningssa_excSAPendingDeprecationWarningSADeprecationWarning	SAWarningr
   DeprecationWarningpytestPytestDeprecationWarningImportError)originr$   s     r   setup_filtersr(      s	    )F6== Gf.I.IJGf.>.>?H/AB,V #- ,,/
 ,,K
 	V<<V	
  s   D9 9	EEc                     t        j                  t        j                  ||      5   |        cddd       S # 1 sw Y   yxY w)zzAssert that each of the given warnings are emitted by fn.

    Deprecated.  Please use assertions.expect_warnings().

    )regexN)r   _expect_warningsr   r"   )fnwarning_msgsr*   s      r   assert_warningsr.   N   s;     
	$	$,e
  t  s	   8A)F)
__future__r   r    r   r   r   util.langhelpersr   Warningr
   r   r(   r.   r   r   r   <module>r3      s2    '    - 9-
`
r   