-Sg d dl Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lm Z dd lm Z ddlmZ ddlm Z G d de ZdS ) N )MigrationContext) assert_raises)config)eq_)is_)is_false)is_not_)is_true)ne_)TestBasec e Zd ZdZdZd Zd Zd Zd Zd Z d Z d Zd Zd Z d Zd Zd Zd Zd Zej j d Zej j d Zd Zd Zd ZdS )MigrationTransactionTestTNc Z t j x| _ }| dd rOt j |j | | _ t j x| j _ | j j _ nt j || | _ | j S )Nas_sqlF)dialectopts) connectionr ) r dbconnectconngetr configurer contextioStringIO output_bufferimpl)selfr r s x/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/alembic/testing/suite/test_environment.py_fixturez!MigrationTransactionTest._fixture s !9,,... D88He$$ +54 DL DL&!// ,5d DL | c J | j r| j d S d S )N)r close)r s r teardown_methodz(MigrationTransactionTest.teardown_method$ s. 9 IOO r" c n | ddd }t | j | d }t | j | t | j d S NTtransaction_per_migrationtransactional_ddl_per_migration)r! r r in_transactionbegin_transactionr rollbackr r proxys r test_proxy_transaction_rollbackz8MigrationTransactionTest.test_proxy_transaction_rollback( s --*.TJJ ))++,,,)))>> ((**+++ ))++,,,,,r" c " | ddd }| d }t | j | t | j d S r' r! r. r r r- commitr r0 s r test_proxy_transaction_commitz6MigrationTransactionTest.test_proxy_transaction_commit3 s --*.TJJ )))>> ((**+++ ))++,,,,,r" c 0 | ddd }| d }t | j |5 d d d n# 1 swxY w Y t | j d S r' )r! r. r r r- r r0 s r ,test_proxy_transaction_contextmanager_commitzEMigrationTransactionTest.test_proxy_transaction_contextmanager_commit<