• File: test_reflection.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyc
  • Date Modified: 08/05/2019 10:14 AM
  • File size: 37.07 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

4]c@sddlZddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lm
Z
ddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZe e f\Z!Z"de
j#fdYZ$de
j#fdYZ%de
j#fdYZ&dddfZ'dS( iNi(tassert_raises_message(tconfig(tengines(teq_(texpect_warnings(tfixtures(tis_(tColumn(tTablei(tevent(texc(t
ForeignKey(tinspect(tInteger(tMetaData(tString(ttesting(ttypes(t	Inspector(tDDL(tIndex(tquoted_nametHasTableTestcBs&eZeZedZdZRS(cCs5td|tdtdttdtddS(Nt
test_tabletidtprimary_keytdatai2(RRR
tTrueR(tclstmetadata((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt
define_tables#s
cCsYtjjD}tjjj|ds0ttjjj|dsOtWdQXdS(NRtnonexistent_table(Rtdbtbegintdialectt	has_tabletAssertionError(tselftconn((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_has_table,s(t__name__t
__module__Rt__backend__tclassmethodRR'(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR s	tComponentReflectionTestcBsZeZdEZZeZedZedZ	edZ
edZedZedZ
ejjdZejjdZejjdZejdEd	dEd
ZejjdZejjejjejjdZejjd
ZejjejjdZejjdZ ejjejj!dZ"dEdZ#ejjejj!dZ$ejj%dZ&ejj%ejj!dZ'ejjejj%dZ(dEd	dZ)ejjdZ*ejdZ+ejjdZ,ejjdZ-ejjejdZ.ejjejj!dZ/ejj0dZ1ejj0ejj%ejjdZ2ejj%dZ3ejj%ejj!d Z4ejdEd!Z5ejj6d"Z7ejjejj6ejj!d#Z8ejjejd$Z9ejdEd%Z:ejjd&Z;ejjejj!d'Z<ejj=ejj!d(Z>ejj?d)Z@ejjAd*ZBejd+ZCd,ZDejdEd-ZEejjFd.ZGejjFejj!d/ZHejd0ZIejjFd1ZJejjFd2ZKejjLejd3ZMejjNd4ZOejj0ejjNd5ZPejj0d6ZQejjNejj!d7ZRejdEd8ZSejjTd9ZUejjTejj!d:ZVejdEd;ZWejdEd<ZXejjd=ZYejjejj!d>ZZej[d?d@ejdEdAZ\dBZ]ejj!dCZ^ejjejdDZ_RS(FcCsFtjjjr;ddlm}tjdtd|j	Stj
SdS(Ni(tpooltoptionst	poolclass(Rtrequirementstindependent_connectionstenabledt
sqlalchemyR-Rttesting_enginetdictt
StaticPoolR (RR-((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt
setup_bind7s
	cCs<|j|dtjjjr8|j|tjjndS(N(tdefine_reflected_tablestNoneRtrequirestschemasR2Rttest_schema(RR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRBsc
Cs|r|d}nd}tjjjrtd|tdtjdttdtj	ddt
td	tjddt
td
tjtj
d|dd
d|dt}nftd|tdtjdttdtj	ddt
td	tjddt
d|dt}td|tdtjdttdtjtj
d|tdtjdd|dttd|tdtjtdtjtj
|jjtdtjdtjdddd|dttd|tdtjdtddtdtjdddtd tjddd!d|dd"tjjjr|dkrtd#|tdtjdttdtjdtd$t
d%tjjdtdtjjjqtd&|tdtjdttd't
d(tjjjtdtjdd|dttd)|tdtjdttdtjdd|dtntjjjrL|j|||sLtd*|td+tjddt}td,|tdtjdttd+tjddt}td-|jjjtd.|jjjqLntjjjrn|j||n|rtjj jr|j!|ndS(/Nt.ttuserstuser_idRttest1itnullablettest2tparent_user_ids%susers.user_idtnamet
user_id_fktschemat
test_needs_fkt
dingalingstdingaling_idt
address_ids%semail_addresses.address_idRitemail_addressestremote_user_idt
email_addressitemail_ad_pktcomment_testRtcomments
id commentsdata % commenttd2s)Comment types type speedily ' " \ '' Fun!sthe test % ' " \ table commenttlocal_tablet	remote_ids%s.remote_table_2.idtremote_tabletlocal_ids%s.local_table.idtremote_table_2tnoncol_idx_test_nopktqtnoncol_idx_test_pktnoncol_idx_nopkt
noncol_idx_pk("RR:tself_referential_foreign_keysR2RRtsatINTRtCHARtFalsetFloatR
RRtcR@tPrimaryKeyConstrainttcross_schema_fk_reflectionR9RR<R R"tdefault_schema_nametindex_reflectiontdefine_indexRRYtdesctview_column_reflectiontdefine_viewsttemp_table_reflectiontdefine_temp_tables(RRRGt
schema_prefixR?RXRZ((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR8Hs
		
		c
Cstjdr)idgd6dd6}nidgd6}td|tdtjd	ttd
tjdtdtjtjd
d
d
tj	dd|}tj
jjrtj
j
jrtj|dtdtj|dtdndS(NtoraclesGLOBAL TEMPORARYtprefixess
PRESERVE ROWStoracle_on_committ	TEMPORARYtuser_tmpRRREi2tfootuser_tmp_uqtuser_tmp_ixtafter_creates:create temporary view user_tmp_v as select * from user_tmptbefore_dropsdrop view user_tmp_v(RtagainstRRR^R_RtVARCHARtUniqueConstraintRR:tview_reflectionR2ttemporary_viewsR	tlistenR(RRtkwRs((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRms,

	
cCsEtd|jj|jjtd|jj|jj|jjdS(Ntusers_t_idxt
users_all_idx(RRcRARCR@(RRR?((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRhscCsx}d	D]u}|}|r,d||f}n|d}d||f}tj|dt|tj|dtd|qWdS(
NR?RLs%s.%st_vs"CREATE VIEW %s AS SELECT * FROM %sRwRxsDROP VIEW %s(R?RL(R	R~R(RRRGt
table_nametfullnamet	view_nametquery((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRks


cCs2ttj}|jtjj|jkdS(N(RRR tassert_RR<tget_schema_names(R%tinsp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_schema_namesscCsKtj}t|jds%tt|t|jdsGtdS(NRf(RR4thasattrR"R$R(R%tengine((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_dialect_initializes
cCs,ttj}t|jtjjjdS(N(RRR RRfR"(R%R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_default_schema_namesttablecCs5ddddddg}|j}t|j}|dkrw|j|}|jdd	g}tt||n|rg|j|D]}	|	d
r|	d
^q}
n|j|}
g|
D]}||kr|^q}|dkrdd
dg}t||n"dd
dg}tt||dS(NRPRZRXRSRURWtviewtemail_addresses_vtusers_vitforeign_keyR?RLRI(	RRtbindtget_view_namestsortRtsortedtget_sorted_table_and_fkc_namestget_table_names(R%RGt
table_typetorder_byt_ignore_tablestmetaRttable_namestanswertrecttablestt((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_table_names"s0		
%cCs5t|j}|j}tt|dgdS(NRs(RRtget_temp_table_namesRR(R%Rttemp_table_names((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_table_namesIscCs5t|j}|j}tt|dgdS(Nt
user_tmp_v(RRtget_temp_view_namesRR(R%RR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_view_namesOscCs|jdS(N(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_namesWscCs|jdddS(NRR(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_names_fks[scCs|jdS(N(t_test_get_comments(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_comments`scCs|jtjjdS(N(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_comments_with_schemadscCsttj}t|jdd|idd6t|jdd|idd6tg|jdd|D]"}i|dd6|dd6^qnidd6d	d6id
d6dd6idd6d
d6gdS(NRPRGsthe test % ' " \ table commentttextR?RERQs
id commentRsdata % commentRs)Comment types type speedily ' " \ '' Fun!RR(RRR Rtget_table_commentR9tget_columns(R%RGRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRis#8cCs|jtjjdS(N(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt test_get_table_names_with_schemascCs|jdddS(NRR(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_namesscCs|jtjjdddS(NRR(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_names_with_schemascCs|j|jdddS(NRR(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_tables_and_viewss
cCsttj}|jj|jj}}ddg}|dkrOddg}nt|j}xt|||fD]\}}	|}
|j	|d|
}|j
t|dkt|xKt|	j
D]:\}}
t|
j||d||d	j}|
j}t|tjjr,|j}ntjd
r_|tjtjfkr_tj}n|j
tt|jj|jjtjtjtjtjtjtj tj!gdkd|
j|
j||d|f|
j"s||ddkst$qqWqtWdS(
NR?RLRRRRGiREttypeRos%s(%s), %s(%s)tdefault(%RRR RR?RLRRtzipRRtlent	enumeratetcolumnsRREt	__class__Rt
isinstanceR^Rt
TypeEngineRyt	sql_typestDatetDateTimetsett__mro__tintersectionR
tNumerictTimeRt_BinaryRR9R$(R%RGRRR?t	addressesRRRRtschema_nametcolstitcoltctypet	ctype_def((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_columnssH""	"	cCs|jdS(N(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_columnsscGs{td|jgt|D]\}}td||^q}|jgt|jjjdD]}|d^qgS(NRst%dR(RRRRtcreateRRR(R%RRttype_RRc((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_type_round_trips5
cCsbx[|jtjddD]>}t|tjs:tt|jdt|jdqWdS(Nii(RRRRR$Rt	precisiontscale(R%ttyp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_numeric_reflections"cCsH|jtjdd}t|tjs4tt|jddS(Ni4i(RRRRR$Rtlength(R%R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_varchar_reflectionsc	Cstd|jtdtdttdtdt}|jttdt	|jj
jdDitd6td6dS(NRtaRBtbcss#|]}|d|dfVqdS(RERBN((t.0R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>s(RRRR
RRaRRR5RRR(R%R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_nullable_reflections
cCs|jdtjjdS(NRG(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_columns_with_schemascCst|j}|jj}t|j}|jd}|jt|dkt|x5t|j	D]$\}}t
|j||dqkWdS(NRsiRE(RRRRsRRRRRRRRE(R%RRsRRRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_table_columnss"cCsOt|j}|jd}tg|D]}|d^q(dddgdS(NRRERRt(RRRR(R%RRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_view_columnsscCs|jdddS(NRR(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_columnsscCs |jdtjjdddS(NRGRR(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt!test_get_view_columns_with_schemas	c
Cs|j}|jj|jj}}t|j}|j|jd|}|d}t|dg|j|jd|}|d}	t|	dgt	j
jjt|ddWdQXdS(NRGtconstrained_columnsR@RKRERO(
RRR?RLRRtget_pk_constraintRERRR:treflects_pk_namestfail_if(
R%RGRR?RRt
users_constusers_pkeyst	addr_const
addr_pkeys((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_pk_constraint%s	

cCs|jdS(N(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_pk_constraint6scCs|jdtjjdS(NRG(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt"test_get_pk_constraint_with_schema:scCsD|j}|jj}t|j}ttjd|j|j	dS(Ns+.*get_primary_keys\(\) method is deprecated(
RRR?RRRtsa_exctSADeprecationWarningtget_primary_keysRE(R%RR?R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt test_deprecated_get_primary_keys@s	c
Cs|j}|jj|jj}}t|j}|}tjjj	r|j
|jd|}|d}tjjj
t|ddWdQXt|d|t|d|jt|ddgtjjj	rt|d	d
gqn|j
|jd|}	|	d}tjjj
|j|ddk	WdQXt|d|t|d|jt|ddgt|d	dgdS(NRGiRERFtreferred_schematreferred_tabletreferred_columnsR@RRDRM(RRR?RLRRRR:R]R2tget_foreign_keysREtnamed_constraintsRRtimplicitly_named_constraintsRR9(
R%RGRR?RRtexpected_schematusers_fkeystfkey1t
addr_fkeys((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_foreign_keysMs,	

cCs|jdS(N(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_foreign_keysnscCs|jdtjjdS(NRG(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt!test_get_foreign_keys_with_schemarsc	Csp|jdtjjjdtjjdtjj\}}}ttj}|j|j	}t
t|d|d}t
|dtjjt
|d|j	t
|dd	gt
|d
dg|j|j	dtjj}t
t|d|d}|ddtjjjfks0t
t
|d|j	t
|dd	gt
|d
d
gdS(Ns%s.local_tables%s.remote_tables%s.remote_table_2iiRRRRRRTRGRV(RRR R"RfRR<RRRERRR9R$(	R%RSRURWRtlocal_fkeysRtremote_fkeystfkey2((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt"test_get_inter_schema_foreign_keysws,


cCs|jdddS(NtondeletetCASCADE(t_test_get_foreign_key_options(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt%test_get_foreign_key_options_ondeletescCs|jdddS(NtonupdatesSET NULL(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt%test_get_foreign_key_options_onupdatescs{|j}td|tdtdtdttd|tdtdttdttjddd	td
tddttd|tdtdttdtd
dttdttj	dgdgdd|dt|j
t|j}|j
dddttfdDi|j
dddttfdD|dS(NtxRRRHRtx_idsx.idREtxidttesti
tuseri2RBttidstable.idtmyfkiR.c3s)|]}|r||fVqdS(N((Rtk(topts(s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>sc3s)|]}|r||fVqdS(N((RR(R(s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>s(RRRR
RR^RRRatForeignKeyConstraintt
create_allRRRRR5(R%R.RR((Rs[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRs8	
#cCsg|D]}|d^q}xa|D]Y}|d|ks@t||j|d}x#|D]}t||||q^Wq$WdS(NRE(R$tindexR(R%tindexestexpected_indexestdtindex_nameste_indexRtkey((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_assert_insp_indexess

cCs|j}t|j}|jdd|}itd6ddgd6dd6itd6d	ddgd6d
d6g}|j||dS(NR?RGtuniqueRARCtcolumn_namesRRER@R(RRRtget_indexesRaR(R%RGRRRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_indexess	

cCs|jdS(N(R(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_indexesscCs|jdtjjdS(NRG(RRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_indexes_with_schemascCs|j}t|j}|j|}itd6|d6g}|j||t||d|j}tt|j	dt
t|j	dj|tt|j	dj
|dS(NRREt
autoload_withii(RRRRRaRRRRRRtlistRRE(R%ttnametixnameRRRRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_noncol_indexs	cCs|jdddS(NRXR[(R&(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_noncol_index_no_pkscCs|jdddS(NRZR\(R&(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_noncol_index_pksc	Cstd|jtdtdtdtdtj|jdtdtj|jdtd|jjt|jj	}t
d6t|jdid	d
6dgd6dd
6gWdQXdS(NRR	ityRws+CREATE INDEX t_idx ON t(lower(x), lower(y))sCREATE INDEX t_idx_2 ON t(x)s>Skipped unsupported reflection of expression-based index t_idxtt_idx_2RERiR(
RRRRR	R~RRRRRRR(R%R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt%test_reflect_expression_based_indexess$


cCs|jdS(N(t_test_get_unique_constraints(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_unique_constraints,scCsdt|j}|jd}x|D]}|jddq%Wt|idgd6dd6gdS(NRstduplicates_indexRERRu(RRtget_unique_constraintstpopR9R(R%Rt	reflectedtrefl((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt&test_get_temp_table_unique_constraints0s

cCst|j}|jd}x|D]}|jddq%Wtg|D]}|ddkrI|^qIitd6dgd6dd6gdS(NRstdialect_optionsRERvRRtR(RRRR0R9RRa(R%RRtindtidx((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_table_indexes;s
&
cCs|jdtjjdS(NRG(R,RRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt'test_get_unique_constraints_with_schemaNscCstidd6dgd6idd6dddgd6idd6dddgd6id	d6d
dgd6idd6dgd6id
d6dgd6gdtjd}|j}td|tdtjdtdtjdtdtjtd
tjdtdtjdd|}x2|D]*}|j	tj
d|d|dq*W|jt|j
}t|jdd|dtjd}t}xRt||D]A\}	}
|
jdd}|r|j|nt|	|
qWt}td|d|j
d|}tg|jD]}
|
j^q-}tg|jD]!}t|tj
rR|j^qRjdg}|j|st|rt||t|tndS(Ntunique_aRERRtunique_a_b_cRRctunique_c_a_btunique_asc_keytascRsi.have.dotss
i have spacesttesttbliiRGR.R"(Rtoperatort
itemgetterRRRR^RR
tappend_constraintR{RRRR/RRR0R9taddRRRREtconstraintsRt
differenceRR$(R%RGtuniquest	orig_metaRtuct	inspectorR1tnames_that_duplicate_indextorigR2tdupetreflected_metadataR6t	idx_namestuqtuq_names((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR,Ss`		
"
				%
$
cCs|jdS(N(t_test_get_check_constraints(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_check_constraintsscCs|jdtjjdS(NRG(RPRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt!test_get_check_constraints_schemasc	Cs|j}td|tdttjdddtjdddd||jt|j}t	|j
dd|d	tjd}d
}g|D](}i|dd6||dd6^q}t
|idd6dd6idd6d
d6gdS(Ntsa_ccRsa > 1 AND a < 5REtcc1sa = 1 OR (a > 2 AND a < 5)tcc2RGRcSs%djtjd|jtjS(Nt sand|\d|=|a|or|<|>(tjointretfindalltlowertI(tsqltext((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt	normalizesR\sa > 1 and a < 5sa = 1 or a > 2 and a < 5(RRRR
R^tCheckConstraintRRRRtget_check_constraintsR?R@R(R%RGRFRHR1R]titem((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRPs(	
	2cCsl|j}d}d}t|j}|j|d|}|j||j|d|}|j|dS(NRRRG(RRRtget_view_definitionR(R%RGRt
view_name1t
view_name2Rtv1tv2((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_view_definitions	
cCs|jdS(N(Rf(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_definitionscCs|jdtjjdS(NRG(RfRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt$test_get_view_definition_with_schemast
postgresqlsPG specific featurecCsD|j}t|j}|j||}|jt|tdS(N(RRRt
get_table_oidRRtint(R%RRGRRtoid((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_table_oids	cCs|jddS(NR?(Rm(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oidscCs|jddtjjdS(NR?RG(RmRRR<(R%((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oid_with_schemascCsw|j}t|j}xXd
ddgD]G\}}|j|}d|D|}|jdts(tq(Wd	S(
stest that 'autoincrement' is reflected according to sqla's policy.

        Don't mark this test as unsupported for any backend !

        (technically it fails with MySQL InnoDB since "id" comes before "id2")

        A backend is better off not returning "autoincrement" at all,
        instead of potentially returning "False" for an auto-incrementing
        primary key column.

        R?R@RLRKRIRJcSsi|]}||dqS(RE((RRc((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys
<dictcomp>s	t
autoincrementN(R?R@(RLRK(RIRJ(RRRRtgetRR$(R%RRR$tcnameRtid_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_autoincrement_cols	N(`R(R)R9trun_insertstrun_deletesRR*R+R7RR8RmRhRkRR:tschema_reflectionRRRtprovide_metadataRRRR|R}Rttable_reflectionRt!foreign_key_constraint_reflectionRtcomment_reflectionRR;RRRRjRRRRRRRRRRRlRRRRRt!primary_key_constraint_reflectionRRRRRRReRt1foreign_key_constraint_option_reflection_ondeleteRt1foreign_key_constraint_option_reflection_onupdateRRRRRgR R!R&R'R(tindexes_with_expressionsR+tunique_constraint_reflectionR-R3R7R8R,tcheck_constraint_reflectionRQRRRPRfRgRhtonly_onRmRnRoRt(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR,2s
$%							8
								 		"-				
	N	'
			tNormalizedNameTestcBs5eZdZeZedZdZdZRS(tdenormalized_namescCslttddt|tdtdtttddt|tdtdttdtddS(Ntt1tquoteRRtt2tt1idst1.id(RRRRR
R(RR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRscCsttj}ttddt|dt}|jd}|jjj	|jj
s^tttj}|jdd|jdjjj	|jdjj
stdS(NRRtautoloadRtonlycSs|jdkS(NRR(RR(RZ(REtm((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt<lambda>,R>(
RRR RRRRRcRt
referencesRR$treflect(R%tm2tt2_reftt1_reftm3((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt$test_reflect_lowercase_forced_tables$s!
!cCsgttjjD]}|jdkr|^q}t|dj|djt|dj|djdS(NRRii(RR(RRR RRZRtupper(R%Rt
tablenames((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR/s
!(R(	R(R)t__requires__RR*R+RRR(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRs
	((R?RXR3R^R>RRRRRRRRGRRR	R
RRRR
RRRRRtengine.reflectionRRRtsql.elementsRR9RR?t
TablesTestRR,Rt__all__(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt<module>s@(