a
    •˜ëj
  ã                   @  sn   d dl mZ d dlZddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 d	d
„ Z
dd„ Zddd„ZdS )é    )ÚannotationsNé   )Ú
assertionsé   )Úexc)ÚSATestSuiteWarning)Ú_warnings_warnc                 C  s   t | td� d S )N©Úcategory)r   r   )Úmessage© r   úZ/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/sqlalchemy/testing/warnings.pyÚwarn_test_suite   s    r   c                   C  s$   t jdtjd� t jdtjd� dS )a  hook for setting up warnings filters.

    SQLAlchemy-specific classes must only be here and not in pytest config,
    as we need to delay importing SQLAlchemy until conftest.py has been
    processed.

    NOTE: filters on subclasses of DeprecationWarning or
    PendingDeprecationWarning have no effect if added here, since pytest
    will add at each test the following filters
    ``always::PendingDeprecationWarning`` and ``always::DeprecationWarning``
    that will take precedence over any added here.

    Úerrorr	   ÚalwaysN)ÚwarningsÚfilterwarningsr   Ú	SAWarningr   r   r   r   r   Úsetup_filters   s    r   Fc                 C  s<   t jtj||d�� | ƒ W  d  ƒ S 1 s.0    Y  dS )zzAssert that each of the given warnings are emitted by fn.

    Deprecated.  Please use assertions.expect_warnings().

    )ÚregexN)r   Z_expect_warningsÚsa_excr   )ÚfnZwarning_msgsr   r   r   r   Úassert_warnings*   s    ÿr   )F)Ú
__future__r   r   Ú r   r   r   r   Zutil.langhelpersr   r   r   r   r   r   r   r   Ú<module>	   s   