File: //usr/local/lib/python3.10/dist-packages/sqlalchemy/testing/__pycache__/assertions.cpython-310.pyc
o
���g�z � @ s� d dl mZ d dlmZ d dlZd dlmZ d dlmZ d dlZd dl Z d dl
Z
ddlmZ ddlm
Z
dd lmZ dd
lmZ ddlmZ ddlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ dd� Z ej!dd� �Z"dd� Z#dd� Z$dd � Z%d!d"� Z&d#d$� Z'da(da)da* % & %dod'd(�Z+ej! % & % & &dpd)d*��Z,d+d,� Z-d-d.� Z.d/d0� Z/dqd1d2�Z0dqd3d4�Z1dqd5d6�Z2dqd7d8�Z3dqd9d:�Z4dqd;d<�Z5dqd=d>�Z6dqd?d@�Z7dqdAdB�Z8dqdCdD�Z9dqdEdF�Z:e:Z;dqdGdH�Z<dqdIdJ�Z=e=Z>dqdKdL�Z?dqdMdN�Z@dOdP� ZAdQdR� ZBdSdT� ZCdUdV� ZDdWdX� ZEdYdZ� ZFd[d\� ZG &drd]d^�ZHG d_d`� d`�ZIej!drdadb��ZJdsdcdd�ZKdsdedf�ZLG dgdh� dh�ZMG didj� dj�ZNG dkdl� dl�ZOG dmdn� dn�ZPdS )t� )�annotations)�defaultdictN)�copy)�filterfalse� )� assertsql)�config)�engines)�mock)�db_spec)�fail� )�exc)�schema)�sql)�types)�util)�default)�url)�LABEL_STYLE_TABLENAME_PLUS_COL�� decoratorc O � t tj| fi |��S )a� Context manager which expects one or more warnings.
With no arguments, squelches all SAWarning emitted via
sqlalchemy.util.warn and sqlalchemy.util.warn_limited. Otherwise
pass string expressions that will match selected warnings via regex;
all non-matching warnings are sent through.
The expect version **asserts** that the warnings were in fact seen.
Note that the test suite sets SAWarning warnings to raise exceptions.
)�_expect_warnings_sqla_only�sa_exc� SAWarning��messages�kw� r �H/usr/local/lib/python3.10/dist-packages/sqlalchemy/testing/assertions.py�expect_warnings% s
r! c o sb � t | �}t| t�r|tj�sdV dS t|i |��� dV W d � dS 1 s*w Y dS )z�Context manager which expects one or more warnings on specific
dialects.
The expect version **asserts** that the warnings were in fact seen.
N)r �
isinstance�strr �_currentr! )�dbr r �specr r r �expect_warnings_on5 s �
"�r'