%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyo

�
��4]c@srddlZddlZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	lm
Z
d
dlmZd
dlmZd
d
lmZd
dlmZdefd��YZdefd��YZdefd��YZdefd��YZdeefd��YZdeeejfd��YZdefd��YZdS(i����Ni(t
assertions(tconfig(tschema(tdrop_all_tables(tBasicEntity(tComparableEntity(tadicti(tevent(tutil(tdeclarative_base(tDeclarativeMetatTestBasecBsDeZdZdZdZdZdZdd�Zd�Z	d�Z
RS(cCsdS(N((tselftvaltmsg((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytassert_/scCs t|d�r|j�ndS(NtsetUp(thasattrR(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytsetup3scCs t|d�r|j�ndS(NttearDown(RR(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytteardown7s(((N(t__name__t
__module__t
__whitelist__t__requires__t__unsupported_on__tNonet__only_on__t__skip_if__RRR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRs	t
TablesTestcBs7eZdZdZdZdZdZdZdZ	dZ
dZdZe
d��Ze
d��Ze
d��Ze
d��Zd�Zd�Zd�Zd	�Zd
�Ze
d��Ze
d��Ze
d
��Ze
d��Ze
d��Ze
d��Ze
d��Zd�Zd�Ze
d��Z RS(tonceteachcCs"|j�|j�|j�dS(N(t_init_classt_setup_once_tablest_setup_once_inserts(tcls((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytsetup_classUs

cCsv|jdkr-|jdkr-d|_q-nt�|_t�|_|j�|_tj�|_	|j|j	_dS(NRR(
trun_define_tablestrun_create_tablesRtotherttablest
setup_bindtbindtsatMetaDatatmetadata(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR ]scCs*|jdkr&|j�|j�ndS(NR(trun_insertst_load_fixturestinsert_data(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR"ks
cCsa|jdkr]|j|j�|jdkrD|jj|j�n|jj|jj�ndS(NR(R%t
define_tablesR-R&t
create_allR*R(tupdate(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR!qs
cCs�|jdkr�|jj�|jdkrAt|j|j�n|jj�|j|j�|jdkr�|jj|j�n|jj	|jj�n8|jdkr�t|j|j�|jj|j�ndS(NR(
R%R(tclearR&RR-R*R1R2R3(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt_setup_each_tablesys

cCs*|jdkr&|j�|j�ndS(NR(R.R/R0(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt_setup_each_inserts�s
c
Cs�|jdkr�|jdkr�|jj��w}xmt|jj�D]Y}y|j|j��WqCt	j
jk
r�}tj
d||fdtj�qCXqCWWdQXndS(NRsError emptying table %s: %rtfile(R%trun_deletesR*tconnecttreversedR-t
sorted_tablestexecutetdeleteR+texct
DBAPIErrorRtprint_tsyststderr(Rtconnttabletex((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt_teardown_each_tables�scCs|j�|j�dS(N(R5R6(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�s
cCs|j�dS(N(RF(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�scCsl|jrt|j|j�n|jdkrA|j|j�nd|j_|jdk	rhd|_ndS(NR(R&RR-R*trun_dispose_bindtdispose_bindRtrun_setup_bind(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt_teardown_once_metadata_bind�s	cCs|j�dS(N(RJ(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytteardown_class�scCstjS(N(Rtdb(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR)�scCs<t|d�r|j�nt|d�r8|j�ndS(Ntdisposetclose(RRMRN(R#R*((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRH�s
cCsdS(N((R#R-((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR1�scCsiS(N((R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytfixtures�scCsdS(N((R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR0�scCs|j|j||�dS(N(tassert_sql_countR*(Rtcounttfn((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt
sql_count_�scCs|j|j||�dS(N(t
assert_sqlR*(Rt	callable_t
statements((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytsql_eq_�sc	Cs�ii}}xv|j�j�D]b\}}t|�dkrDq nt|tj�rf|j|}n|d||<|d||<q Wxi|jjD][}||kr�q�n|j	j
|j�g||D]}tt
|||��^q��q�WdS(s4Insert rows as represented by the fixtures() method.iiiN(ROtitemstlent
isinstanceRtstring_typesR(R-R;R*R<tinserttdicttzip(R#theaderstrowsRDtdatat
column_values((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR/�s
		N(!RRRIR%R&R.R8RRGR*R-R(R'tclassmethodR$R R"R!R5R6RFRRRJRKR)RHR1ROR0RSRWR/(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR<s:			
		
		t
RemovesEventscBs,eZejd��Zd�Zd�ZRS(cCst�S(N(tset(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt
_event_fns�scKs3|jj|||f�tj||||�dS(N(RftaddRtlisten(RttargettnameRRtkw((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pytevent_listen�scCsPx|jD]}tj|�q
Wtt|�}t|d�rL|j�ndS(NR(RfRtremovetsuperRdRR(Rtkeytsuper_((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�s
(RRRtmemoized_propertyRfRlR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRd�s	t_ORMTestcBseZed��ZRS(cCs!tjjj�tjj�dS(N(R+tormtsessiontclose_all_sessionst
clear_mappers(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRK�s(RRRcRK(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRr�stORMTestcBseZRS((RR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRw�st
MappedTestcBs�eZdZdZdZed��Zed��Zd�Z	d�Z
ed��Zed��Zed��Z
d	�Zd
�Zed��Zd�Zd
�Zed��Zed��ZRS(RRcCsT|j�|jdkr(t�|_n|j�|j�|j�|j�dS(N(R tclassesRRR!t_setup_once_classest_setup_once_mappersR"(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR$
s



cCs|j�|j�dS(N(t_teardown_once_classRJ(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRKs
cCs,|j�|j�|j�|j�dS(N(R5t_setup_each_classest_setup_each_mappersR6(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRs


cCs2tjjj�|j�|j�|j�dS(N(R+RsRtRut_teardown_each_mapperst_teardown_each_classesRF(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR!s

cCs|jj�tj�dS(N(RyR4RrRK(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR|'s
cCs&|jdkr"|j|j�ndS(NR(trun_setup_classest_with_register_classest
setup_classes(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRz,scCs&|jdkr"|j|j�ndS(NR(trun_setup_mappersR�t
setup_mappers(R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR{1scCs&|jdkr"|j|j�ndS(NR(R�R�R�(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR~6scCs&|jdkr"|j|j�ndS(NR(R�R�R�(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR}:scs�|j�dtf�fd��Y}dtj|t�fd��Y}dt|fd��Y}dt|fd��Y}||_||_|�d	S(
s�Run a setup method, framing the operation with a Base class
        that will catch new subclasses to be established within
        the "classes" registry.

        tFindFixturecseZ�fd�ZRS(cs |�|<tj||||�S(N(ttypet__init__(R#t	classnametbasestdict_(tcls_registry(sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�Hs
(RRR�((R�(sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�Gst_BasecBseZRS((RR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�LstBasiccBseZRS((RR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�Ost
ComparablecBseZRS((RR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�RsN(	RyR�Rtwith_metaclasstobjectRRR�R�(R#RRR�R�R�R�((R�sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�>s	"		cCs#|jdkrtjj�ndS(NR(R�R+RsRv(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRYscCs#|jdkr|jj�ndS(NR(R�RyR4(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�`scCsdS(N((R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�dscCsdS(N((R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�hsN(RRR�R�RRyRcR$RKRRR|RzR{R~R}R�RR�R�R�(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyRxs"						tDeclarativeMappedTestcBs2eZdZdZed��Zed��ZRS(RcCsdS(N((R#((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR!qscs�|j�dtf�fd��Y}dtfd��Y}td|jd|d|�}||_|�|jjr�|jr�|jjt	j
�ndS(NtFindFixtureDeclarativecseZ�fd�ZRS(cs |�|<tj||||�S(N(R
R�(R#R�R�R�(R�(sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�zs
(RRR�((R�(sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�ystDeclarativeBasiccBseZejZRS((RRRtTablet
__table_cls__(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�~sR-t	metaclassR#(RyR
R�R	R-R�R(R&R2RRL(R#RRR�R�t	_DeclBase((R�sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�us				(RRR�R�RcR!R�(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyR�ms(RAt
sqlalchemyR+tRRRtenginesRtentitiesRRRRRtext.declarativeR	R
R�RRRdRrRwtAssertsExecutionResultsRxR�(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/fixtures.pyt<module>s& �l

Zerion Mini Shell 1.0