HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyc
�
���ec@@s�ddlmZddlmZddlZddlmZddlZddlZddlZddl	m
Z
ddl	mZddl	mZdd	l	m
Z
dd
lmZddlmZdd
l	mZddl	mZddl	mZddl	mZddl	mZddlmZddlmZddlmZddlmZddlmZd�Zej d��Z!d�Z"d�Z#d�Z$d�Z%d�Z&da(da)da*ej e+e,e+e,e,e,d��Z-d�Z.d �Z/d!�Z0dd"�Z1dd#�Z2dd$�Z3dd%�Z4dd&�Z5dd'�Z6dd(�Z7dd)�Z8dd*�Z9dd+�Z:dd,�Z;e;Z<dd-�Z=dd.�Z>e>Z?dd/�Z@dd0�ZAd1�ZBd2�ZCd3�ZDd4�ZEd5�ZFd6�ZGd7�ZHde,d8�ZId9eJfd:��YZKej de,d;��ZLe+d<�ZMe+d=�ZNd>eJfd?��YZOd@eJfdA��YZPdBeJfdC��YZQdS(Di(tabsolute_import(tdefaultdictN(tcopyi(t	assertsql(tconfig(tengines(tmock(tdb_spec(tfaili(texc(tschema(tsql(ttypes(tutil(tdefault(turl(tLABEL_STYLE_TABLENAME_PLUS_COL(tcompat(t	decoratorcO@sttjtjf||�S(s�Context manager which expects one or more warnings.

    With no arguments, squelches all SAWarning and RemovedIn20Warning 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_exctRemovedIn20Warningt	SAWarning(tmessagestkw((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytexpect_warnings#s
co@sUt|�}t|tj�r6|tj�r6dVnt||��
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(Rt
isinstanceR
tstring_typesRt_currentR(tdbRRtspec((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytexpect_warnings_on5s
"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_(RtFalse(tfntargsR(R(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytdecorateNs(R(RR$((RsN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
emits_warningFscO@sttj||�S(N(RRtSADeprecationWarning(RR((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytexpect_deprecatedVscO@sttj||�S(N(RRtBase20DeprecationWarning(RR((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytexpect_deprecated_20Zsc@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�dt���|||�SWdQXdS(NR (RR!(R"R#R(RR(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR$js(R(RRR$((RRsN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytemits_warning_on^sc@st�fd��}|S(s+Mark a test as immune from fatal deprecation warnings.

    With no arguments, squelches all SADeprecationWarning failures.
    Or pass one or more strings; these will be matched to the root
    of the warning description by warnings.filterwarnings().

    As a special case, you may pass a function name prefixed with //
    and it will be re-written as needed to match the standard warning
    verbiage emitted by the sqlalchemy.util.deprecated decorator.

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

    c@s*tdt���|||�SWdQXdS(NR (R'R!(R"R#R(R(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR$�s(R(RR$((RsN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytuses_deprecatedrsc
#@s��s�r>g|D]"}tj|tjtjB�^q�nt|��tdk	r�tdk	sht�t	dk	szt�tj
��tj��t	|f7a	dVn$t���a�a|fa	�r�d��n	t
j��������fd�}	tjd|	���tjdt���tjdt���tjdd��jz	dVWddaaa	|r�|s�tjr��s�tdd	j�fd
��D����nXWdQXWdQXWdQXWdQXdS(Nc_@std|��dS(NsGot unexpected warning: %r(tAssertionError(tmsgtargR((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt	real_warn�sc@st|t�r*t|�}t|�}n|r=|d}nd}|sZt|t�rw�sp�|||�SdSn�r��r�dSxu�D]T}�r�|j|�s��r�|j|�s��r�||kr��j|�Pq�q�W�s�|||�ndS(Ni(	Rt_EXC_CLSttypetstrtNonet
issubclasstsearchtmatchtdiscard(R-R.Rt	exceptiontfilter_(tfilterstraise_on_any_unexpectedR/tregext
search_msgtseentsquelch_other_warnings(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytour_warn�s(


s
warnings.warns"sqlalchemy.util.SQLALCHEMY_WARN_20s/sqlalchemy.util.deprecations.SQLALCHEMY_WARN_20s2sqlalchemy.engine.row.LegacyRow._default_key_styleisWarnings were not seen: %ss, c3@s(|]}d�r|jn|VqdS(s%rN(tpattern(t.0ts(R<(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys	<genexpr>�s(tretcompiletItStlistt_FILTERSR3t_SEENR,R0textendtupdatetsettwarningstwarnRtpatchtTrueRtpy3ktjoin(
texc_clsRR<R=R tpy2konlyR;R?R-R@((R:R;R/R<R=R>R?sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�s<2


		!


	cC@st�dS(s�Check things that have to be finalized at the end of a test suite.

    Hardcoded at the moment, a modular system can be built here
    to support things like PG prepared transactions, tables all
    dropped, etc.

    N(t!_assert_no_stray_pool_connections(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytglobal_cleanup_assertions�scC@stjj�dS(N(Rttesting_reapertassert_all_closed(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyRV�scC@sGt||�}t||�|ksCtd||d|f��dS(Ns:Given int value %s is not within %d%% of expected value %sid(tinttabsR,(texpectedtreceivedtvariancetdeviance((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytint_within_variance�scC@s2tj||�s.t|p(d||f��dS(Ns%r !~ %r(RDR6R,(tatbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyteq_regexscC@s,||ks(t|p"d||f��dS(s.Assert a == b, with repr messaging on failure.s%r != %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyteq_scC@s,||ks(t|p"d||f��dS(s.Assert a != b, with repr messaging on failure.s%r == %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytne_scC@s,||ks(t|p"d||f��dS(s.Assert a <= b, with repr messaging on failure.s%r != %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytle_scC@s/t||�s+t|p%d||f��dS(Ns%r is not an instance of %r(RR,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytis_instance_ofscC@st|dd|�dS(NR-(tis_R3(RaR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytis_nonescC@st|dd|�dS(NR-(tis_notR3(RaR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytis_not_nonescC@stt|�td|�dS(NR-(RhtboolRQ(RaR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytis_true"scC@stt|�td|�dS(NR-(RhRlR!(RaR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytis_false&scC@s,||ks(t|p"d||f��dS(s.Assert a is b, with repr messaging on failure.s%r is not %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyRh*scC@s,||k	s(t|p"d||f��dS(s2Assert a is not b, with repr messaging on failure.s%r is %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyRj/scC@s,||ks(t|p"d||f��dS(s.Assert a in b, with repr messaging on failure.s%r not in %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytin_8scC@s,||ks(t|p"d||f��dS(s2Assert a in not b, with repr messaging on failure.s%r is in %rN(R,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytnot_in=scC@s/|j|�s+t|p%d||f��dS(s>Assert a.startswith(fragment), with repr messaging on failure.s%r does not start with %rN(t
startswithR,(RatfragmentR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytstartswith_FscC@s�tjdd|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}||ks�t|p�d||f��dS(Ns^\s+?|\nts {2,}t s\ts%r != %r(RDtsubR,(RaRbR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyteq_ignore_whitespaceNscC@sOtjs
dS|j|jk	rK|jrKtsKtd||jf��ndS(sHassert that any exception we're catching does not have a __context__
    without a __cause__, and that __suppress_context__ is never set.

    Python 3 will report nested as exceptions as "during the handling of
    error X, error Y occurred". That's not what we want to do.  we want
    these exceptions in a cause chain.

    NsZException %r was correctly raised but did not set a cause, within context %r as its cause.(R
RRt__context__t	__cause__t__suppress_context__R!R,(R8((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt _assert_proper_exception_contextYs
	
	cO@st||||dt�S(Nt
check_context(t_assert_raisesRQ(t
except_clst	callable_R#R((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
assert_raisesqscO@st||||�S(N(R}(R~RR#R((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_raises_context_okusc	O@st||||d|dt�S(NR-R|(R}RQ(R~R-RR#tkwargs((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_raises_messageyscO@s0t|dgdt��|||�SWdQXdS(slegacy adapter function for functions that were previously using
    assert_raises with SAWarning or similar.

    has some workarounds to accommodate the fact that the callable completes
    with this approach rather than stopping at the exception raise.


    s.*R?N(RRQ(R~RR#R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_warnss	c	O@s<t||gdtdtdt��|||�SWdQXdS(sqlegacy adapter function for functions that were previously using
    assert_raises with SAWarning or similar.

    has some workarounds to accommodate the fact that the callable completes
    with this approach rather than stopping at the exception raise.

    Also uses regex.search() to match the given message to the error string
    rather than regex.match().

    R=R<R?N(RRQR!(R~R-RR#R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_warns_message�s	
cO@st||||d|�S(NR-(R}(R~R-RR#R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt assert_raises_message_context_ok�scC@s/t|||��}|||�WdQX|jS(N(t_expect_raisesterror(R~RR#R�R-R|tec((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR}�st_ErrorContainercB@seZdZRS(N(t__name__t
__module__R3R�(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR��scc@s"t|t�rt|t�s-t|t�r<td��nt�}|r^tj�d}ny|Vt}Wn�|k
r}||_	t
}|dk	r�tj
|tj|�tj�s�td||f��n|r�|r�t|�ntj|�jd�GHnX~|std��dS(NsCUse expect_warnings for warnings, not expect_raises / assert_raisesis%r !~ %ssutf-8s#Callable did not raise an exception(RR1R4tWarningt	TypeErrorR�tsystexc_infoR!R�RQR3RDR5R
t	text_typetUNICODER,R{tencode(R~R-R|R�tare_we_already_in_a_tracebacktsuccessterr((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR��s.	
	

cC@st|d|�S(NR|(R�(R~R|((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
expect_raises�scC@st|d|d|�S(NR-R|(R�(R~R-R|((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytexpect_raises_message�stAssertsCompiledSQLcB@sJeZddedddddeeeeeededeed�ZRS(c2@s�|r'tj��|
�_|�_n�|r6d�n��dkrWt|dd��n�dkrrtjj�n��dks��dkr��dkr�tj��ntjdd��|
�_|�_nK�dkr�tj	��n0t
�tj�rt
jj��j���n|r)|�_ni}i}|rH||d<n|dk	rgt|�|d<n|rzt|d	<n|r�t|d
<n|r�t|d<n|r�t|d<n|s�t|d
t�r�tj|d<nddlm}t
||j�r|j�}t|_|}n|r.||d<ndtfd��Y�dtf�fd��Y}||�jd�|��t
|tj �r�|j!}|r�t"|�q�n#|j#�}|r�t"|d�nt$t�di��}tj%r-|j&d�j'dd�}dtj(��|j&d�GHndtj(��j&d�|GHt)j*ddtj(���}t+||d||�f�|dk	r�t+�j,|�|�n|	dk	r��j,|dt�}t+t-g�j.D]}||^q��|	�n|
dk	rt+�j/|
�n|dk	rKt+�fd ��j0D�|�n|dk	rzt+�fd!��j1D�|�n|r�t�dd�r��fd"�} | d#t�}!|jd|!|�}"t)j*dd|"j2�}| dt�}#|jd|#|�}$t|$j.�}%|$j3}&xY|$j1|$j0BD]G}'|$j4|'}(|(|%kr*g|%D]})|)|(krP|)^qP}%q*q*Wg�t5t�}*x�|%D]�})yt|)|*kr�|*|)d$}+nd}+|&j6|)|)�},|j7d%|,f|+�d&}-�j8|-�|*|)j8|-�Wq�t9k
r=d'|)|f}.ts>t:|.��q�Xq�Wt;�fd(�t<d)t=���D��}/gt>t?�|%��D]\}0})|)^q�}1d*|%|1|f}.t@|/|.�ndS(+Nt__dialect__Rt
default_qmarkt
paramstyletqmarktdefault_enhancedtschema_translate_maptcolumn_keyst
literal_bindstrender_postcompiletfor_executemanytrender_schema_translatetassert_from_lintingtlintingi(tormtcompile_kwargst
DontAccesscB@seZd�ZRS(cS@std��dS(Ns=compiler accessed .statement; use compiler.current_executable(tNotImplementedError(tselftkey((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt__getattribute__:s(R�R�R�(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�9stCheckCompilerAccessc@s;eZd�Zd�Zd�Zd�Z�fd�ZRS(cS@s�||_i|_t|dt�|_|jr�|j|_t|d�rZ|j|_nt|d�rx|j|_nt|d�r�|j	|_	q�ndS(Ntsupports_executiont
_returningt_inlinet_return_defaults(
ttest_statementt_annotationstgetattrR!R�t_execution_optionsthasattrR�R�R�(R�R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt__init__As			cS@s
|jj�S(N(R�t_default_dialect(R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�Rsc[@s|jjj|d||�S(Ntdialect(R�REt__func__(R�R�R((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyREUsc[@s|jjj|||�S(N(R�t	_compilerR�(R�R�R((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�Zsc@s^t|d�rGtjj|d����|jj||�SWdQXn|jj||�SdS(Nt	statement(R�RRPtobjectR�t_compiler_dispatch(R�tcompilerR�(R�(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�_s			(R�R�R�R�RER�R�((R�(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�@s
				R�tparamssutf-8tasciitignores

SQL String:
s[\n\t]Rts%r != %r on dialect %rtescape_namesc@s#i|]}|j�j|�qS((teffective_valuet
bind_names(RBRb(tc(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys
<dictcomp>�s	c@s#i|]}|j�j|�qS((R�R�(RBRb(R�(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys
<dictcomp>�s	c@s"t��}||_||_|S(N(RR�t
positional(R�R�tcp(R�(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytget_dialect�s		tpyformati����s%%(%s)sis#Expected to find bindparam %r in %rc3@s'|]}�|d�|kVqdS(iN((RBti(t	positions(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys	<genexpr>�sisQOrder of parameters %s does not match the order in the statement %s. Statement %r(ARtDefaultDialecttsupports_default_valuestsupports_default_metavalueR3R�RRR�tStrCompileDialectRR
RRtURLtcreateR�tdefault_schema_nameRHRQR!RtFROM_LINTINGt
sqlalchemyR�tQueryt
_statement_20Rt_label_styleR�REtsqltypest
TypeEnginet_static_cache_keythasht_generate_cache_keytreprRRR�tdecodeR�RDRvRdtconstruct_paramsttupletpositiontuptprefetchtliteral_execute_paramstpost_compile_paramststringtescaped_bind_namesR�Rtgettindextappendt
ValueErrorR,talltrangetlentsortedtzipRm(2R�tclausetresultR�tcheckparamsR�tcheck_literal_executetcheck_post_paramR�tcheckpositionaltcheck_prefetchtuse_default_dialecttallow_dialect_selectR�R�R�R�R�R�R�tfrom_lintingtcheck_param_orderRR�R�tstmtR�tcache_key_no_warningst	param_strtcctptxR�tpyformat_dialectt
pyformat_ct
qmark_dialecttqmark_ctvaluestescapedt
post_paramtnametvtpos_by_valuetstarttesctposR-torderedt_R\((R�R�R�R�sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_compile�s�			




		
/		0



	
,


.N(R�R�R3R!RQR(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR��s&tComparesTablescB@seZed�Zd�ZRS(cC@s�t|j�t|j�ks$t�xMt|j|j�D]6\}}t|j|j�||j|jksut�t|j|j�t|j|j�|r�d}t|j	t	|j	��s�t||j	|j	f��n|j
||�t|j	tj�r"t|j	j
|j	j
�ntd�|jD�d�|jD��|jr:t|jtj�spt�q:q:Wt|j�t|j�ks�t�x0|jD]%}|jj|jdk	s�t�q�WdS(Ns)Type '%s' doesn't correspond to type '%s'cS@sh|]}|jj�qS((tcolumnR
(RBtf((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys	<setcomp>�s	cS@sh|]}|jj�qS((RR
(RBR((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys	<setcomp>�s	(R�R�R,R�RdR
tprimary_keytnullableRR1tassert_types_baseR�tStringtlengthtforeign_keystserver_defaultR
tFetchedValuetcolumnsR3(R�ttabletreflected_tabletstrict_typesR�treflected_cR-((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_tables_equal�s.$"!	$cC@s;|jj|j�s7td|j|j|jf��dS(Ns7On column %r, type '%s' doesn't correspond to type '%s'(R1t_compare_type_affinityR,R
(R�tc1tc2((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�s	(R�R�R!R#R(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR�s!tAssertsExecutionResultscB@sweZd�Zd�Zd�Zd�Zdd�Zd�Zd�Z	d�Z
d�Zej
d	��Zd
�ZRS(cG@s.t|�}t|�GH|j|||�dS(N(RHR�tassert_list(R�R�tclass_tobjects((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
assert_resultscC@sl|jt|�t|�kdd|j�x8tdt|��D]!}|j|||||�qCWdS(Ns/result list is not the same size as test list, s
for class i(R R�R�R�t
assert_row(R�R�R)tlist_R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR(s
cC@s�|j|j|kdt|��x�|j�D]�\}}t|t�r�t|dt�r�|jt||�|d|d�q�|j	|dt||�|d�q0|jt||�|kd|t||�|f�q0WdS(Nsitem class is not iis'attribute %s value %s does not match %s(
R t	__class__R�titemsRR�RHR(R�R,(R�R)trowobjtdescR�tvalue((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR,s''c	@s:dtfd��Y�tj|�}�fd�|D�}xCtj�fd�|�D]&}tdt|�j�jf�qWWt|�t|�kr�tdt|�t|�f�nt����fd�}x\|D]T}xK|D]&}|||�r�|j	|�Pq�q�Wtd�jt
|�f�q�WtS(	s�As assert_result, but the order of objects is not considered.

        The algorithm is very expensive but not a big deal for the small
        numbers of rows that the test suite manipulates.
        t
immutabledictcB@seZd�ZRS(cS@s
t|�S(N(tid(R�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt__hash__/s(R�R�R5(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR3.sc@sh|]}�|��qS(((RBte(R3(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pys	<setcomp>3s	c@s
t|��S(N(R(to(tcls(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt<lambda>6Rts#Unexpected type "%s", expected "%s"s+Unexpected object count "%s", expected "%s"c@s�x�|j�D]w\}}t|t�rhy(�jt||�|d|d�Wq�tk
rdtSXq
t||��|kr
tSq
WtS(Nii(R/RR�tassert_unordered_resultR�R,R!RQ(tobjRR�R2(tNOVALUER�(sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
_compare_itemEs"
s2Expected %s instance with attributes %s not found.(tdictR
tIdentitySettitertools_filterfalseRR1R�R�R�tremoveR�RQ(	R�R�R8R\tfoundtwrongR=t
expected_itemt
found_item((R<R8R3R�sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR:'s.		


cC@s,|dkrddlm}ntj|�S(Ni(R(R3RtRRt
assert_engine(R�R((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytsql_execution_asserter_scG@s2|j|��}|�}WdQX|j|�|S(N(RGR (R�RRtrulestasserterR�((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_sql_executiones
c	C@s�g}xv|D]n}t|t�r_tjg|j�D]\}}tj||�^q5�}ntj|�}|j|�q
W|j|||�S(N(RR>RtAllOfR/tCompiledSQLR�RJ(	R�RRRHtnewrulestruletkRtnewrule((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt
assert_sqlks
7cC@s |j||tj|��dS(N(RJRtCountStatements(R�RRtcount((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_sql_countysc
C@s�gt||�D]$\}}|j|�||f^q}g}x*|D]"\}}}|j|j��qGWz|�SWdxOt||�D]>\}	\}}}|jddd�|	jtj|��q�WXdS(N(	R�RGR�t	__enter__t__exit__R3R RRR(
R�tdbsRtcountsRRStrecst	asserterstctxRI((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_multiple_sql_count~s7%cg@s.|j|��}dVWdQX|j|�dS(N(RGR (R�RRHRI((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_execution�scC@s|j|tj|��S(N(R]RRR(R�RRS((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pytassert_statement_count�sN(R�R�R+R(R,R:R3RGRJRQRTR\t
contextlibtcontextmanagerR]R^(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyR's		
		8				(Rt
__future__RtcollectionsRR_RRDR�RNRtRRRRt
exclusionsRR
RR	RR
RRR�tengineRRtsql.selectableRRRRR`RR%R'R)R*R+R3RIRJR0RQR!RRWRVR`RcRdReRfRgRiRkRmRnRhRjtis_not_RoRptnot_in_RsRwR{R�R�R�R�R�R�R}R�R�R�R�R�R�RR'(((sN/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/testing/assertions.pyt<module>s�						Q								
		&�,