Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
sqlalchemy
/
testing
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: assertions.cpython-310.pyc
o [�h�G � @ s d dl mZ d dlZd dlZd dlZddlmZ ddlmZ ddlmZ ddlm Z ddlmZ dd l m Z d dlmZ d dlmZ d d lmZ d dlmZ d dlmZ d dlm Z d dlmZ d dlmZ d dl mZ d dl mZ dd� Zejdd� �Zdd� Zdd� Zdd� Zdd� Z ej !dLd"d#��Z!d$d%� Z"d a#d&d'� Z$dMd(d)�Z%dMd*d+�Z&dMd,d-�Z'dMd.d/�Z(dMd0d1�Z)dMd2d3�Z*dMd4d5�Z+dMd6d7�Z,dMd8d9�Z-dMd:d;�Z.dMd<d=�Z/dMd>d?�Z0d@dA� Z1dBdC� Z2dDdE� Z3G dFdG� dGe4�Z5G dHdI� dIe4�Z6G dJdK� dKe4�Z7dS )N� )�absolute_importN� )� assertsql)�config)�mock)�util)�db_spec)�fail� )�exc)�orm)�pool)�schema)�types)�default)�url)�compat�� decoratorc O � t tj| fi |��S )a� Context manager which expects one or more warnings. With no arguments, squelches all SAWarnings 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�sa_exc� SAWarning��messages�kw� r �H/usr/local/lib/python3.10/dist-packages/sqlalchemy/testing/assertions.py�expect_warnings s r c o sd � t | �}t| tj�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 � isinstancer �string_typesr �_currentr )�dbr r �specr r r �expect_warnings_on0 s � "�r$ c � t � fdd��}|S )z�Decorator form of expect_warnings(). Note that emits_warning does **not** assert that the warnings were in fact seen. c �@ t � ddi�� | |i |��W d � S 1 sw Y d S �N�assert_F)r ��fn�argsr �r r r �decorateI � $�zemits_warning.<locals>.decorater �r r- r r, r � emits_warningA s r0 c O r �N)r r �SADeprecationWarningr r r r �expect_deprecatedQ s r3 c s t � �fdd��}|S )aV Mark a test as emitting a warning on a specific dialect. With no arguments, squelches all SAWarning failures. Or pass one or more strings; these will be matched to the root of the warning description by warnings.filterwarnings(). Note that emits_warning_on does **not** assert that the warnings were in fact seen. c sH t � g��R ddi�� | |i |��W d � S 1 sw Y d S r'