%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyo

�
�M!Vc@@s�ddlmZddlZddlmZddlmZddlmZm	Z	ddl
Z
ddlmZddl
mZddlZd	d
lmZejs�dd�Zdd�Zdd
�Zdd�Zd�Zd�Zn.ddlmZmZmZmZmZmZdd�Zdd�ZiZd�Zd�Ze
j d��Z!d�Z"d�Z#e
j e$e$d��Z%dS(i(tabsolute_importNi(tutil(tdefault(t	text_typetpy3k(t	decorator(texci(tmockcC@sdS(s.Assert a == b, with repr messaging on failure.N((tatbtmsg((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyteq_scC@sdS(s.Assert a != b, with repr messaging on failure.N((RR	R
((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytne_scC@sdS(s.Assert a is b, with repr messaging on failure.N((RR	R
((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytis_scC@sdS(s2Assert a is not b, with repr messaging on failure.N((RR	R
((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytis_not_scO@s5y|||�t}Wn|k
r0t}nXdS(N(tFalsetTrue(t
except_clst	callable_targstkwtsuccess((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyt
assert_raises s



cO@s?y|||�Wn'|k
r:}t|�jd�GHnXdS(Nsutf-8(Rtencode(RR
RRtkwargste((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytassert_raises_message*s

(RRR
RRRcC@s�tjdd|�}tjdd|�}tjdd|�}tjdd|�}trrtjdd|�}ntjdd|�}dS(Ns^\s+?|\nts {2,}t s!Utu(tretsubR(RR	R
((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyteq_ignore_whitespace8scC@s_t|�}tt|jd|��jdd�jdd�|jdd�jdd��dS(Ntdialects
Rs	(t_get_dialectRRtcompiletreplace(telementt
assert_stringR!((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytassert_compiledHs
cC@s�|dks|dkr"tj�Syt|SWnrtk
r�ttd|�j|�}|j�t|<}|dkr�t	|_
n|dkr�t|_n|SXdS(NRssqlalchemy.dialects.%st
postgresqltmssql(
tNoneRtDefaultDialectt	_dialectstKeyErrortgetattrt
__import__tdialectsR!Rtimplicit_returningRtlegacy_schema_aliasing(tnametdialect_modtd((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyR"Ts

cO@sttj||�S(s�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.

    (t_expect_warningstsa_exct	SAWarning(tmessagesR((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytexpect_warningses
co@sit|�}t|tj�r6|tj�r6dVn/t|�sJdVnt||��
dVWdQXdS(s�Context manager which expects one or more warnings on specific
    dialects.

    The expect version **asserts** that the warnings were in fact seen.

    N(tdb_spect
isinstanceRtstring_typestconfigt_currentt_is_excludedR:(tdbR9Rtspec((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytexpect_warnings_onus"c@st�fd��}|S(s�Decorator form of expect_warnings().

    Note that emits_warning does **not** assert that the warnings
    were in fact seen.

    c@s*tdt���|||�SWdQXdS(Ntassert_(R:R(tfnRR(R9(sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytdecorate�s(R(R9RF((R9sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyt
emits_warning�sc@st��fd��}|S(sVMark 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@s't����|||�SWdQXdS(N(RC(RERR(RAR9(sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyRF�s(R(RAR9RF((RAR9sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytemits_warning_on�sc#@s��r1g|D]}tj|tj�^q
�n|�t���tj�d�����fd�}tjd|��
dVWdQX|r�ndS(Nc@s�|r)t|��r)�||||�S�s3dSxy�D]?}�rU|j|�sh�r:||kr:�j|�Pq:q:W|dkr��|||�n�||||�dS(N(t
issubclasstmatchtdiscardR*(R
t	exceptiontargRtfilter_(texc_clstfilterst	real_warntregextseen(sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pytour_warn�s

s
warnings.warn(	RR#tItsettwarningstwarnR*Rtpatch(ROR9RRRDR
RT((RORPRQRRRSsK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyR6�s+	(&t
__future__RRRRtsqlalchemy.engineRtutil.compatRRt
contextlibtsqlalchemy.utilRt
sqlalchemyRR7RWRtsqla_094R*RRR
RRRtsqlalchemy.testing.assertionsR R'R,R"R:tcontextmanagerRCRGRHRR6(((sK/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/assertions.pyt<module>s6		

.					

Zerion Mini Shell 1.0