• File: test_reflection.pyo
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyo
  • Date Modified: 08/05/2019 10:14 AM
  • File size: 36.47 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
cCstjj}WdQXdS(N(Rtdbtbegin(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_tablestNoneRtrequirestschemasR.Rttest_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("RR6tself_referential_foreign_keysR.RRtsatINTRtCHARtFalsetFloatR
RRtcR<tPrimaryKeyConstrainttcross_schema_fk_reflectionR5RR8Rtdialecttdefault_schema_nametindex_reflectiontdefine_indexRRUtdesctview_column_reflectiontdefine_viewsttemp_table_reflectiontdefine_temp_tables(RRRCt
schema_prefixR;RTRV((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR4Hs
		
		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_tmpRRRAi2tfootuser_tmp_uqtuser_tmp_ixtafter_creates:create temporary view user_tmp_v as select * from user_tmptbefore_dropsdrop view user_tmp_v(RtagainstRRRZR[RtVARCHARtUniqueConstraintRR6tview_reflectionR.ttemporary_viewsR	tlistenR(RRtkwRp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRjs,

	
cCsEtd|jj|jjtd|jj|jj|jjdS(Ntusers_t_idxt
users_all_idx(RR_R=R?R<(RRR;((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRescCsx}d	D]u}|}|r,d||f}n|d}d||f}tj|dt|tj|dtd|qWdS(
NR;RHs%s.%st_vs"CREATE VIEW %s AS SELECT * FROM %sRtRusDROP VIEW %s(R;RH(R	R{R(RRRCt
table_nametfullnamet	view_nametquery((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRhs


cCs2ttj}|jtjj|jkdS(N(RRRtassert_RR8tget_schema_names(R!tinsp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_schema_namesscCstj}t|dS(N(RR0R(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RRRRcRb(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(NRLRVRTRORQRStviewtemail_addresses_vtusers_vitforeign_keyR;RHRE(	RRtbindtget_view_namestsortRtsortedtget_sorted_table_and_fkc_namestget_table_names(R!RCt
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(NRp(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(RRRR8(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(NRLRCsthe test % ' " \ table commentttextR;RARMs
id commentRsdata % commentRs)Comment types type speedily ' " \ '' Fun!RN(RRRRtget_table_commentR5tget_columns(R!RCRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRis#8cCs|jtjjdS(N(RRRR8(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(RRRR8(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|x1t|	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"sqqWqtWdS(NR;RHRRRRCiRAttypeRls%s(%s), %s(%s)(#RRRRR;RHRRtzipRRtlent	enumeratetcolumnsRRAt	__class__Rt
isinstanceRZRt
TypeEngineRvt	sql_typestDatetDateTimetsett__mro__tintersectionR
tNumerictTimeRt_BinaryR(R!RCRRR;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_RR_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_type_round_trips5
cCsJxC|jtjddD]&}t|jdt|jdqWdS(Nii(RRRRt	precisiontscale(R!ttyp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_numeric_reflections"cCs0|jtjdd}t|jddS(Ni4i(RRRRtlength(R!R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_varchar_reflectionsc	Cstd|jtdtdttdtdt}|jttdt	|jj
jdDitd6td6dS(NRtaR>tbcss#|]}|d|dfVqdS(RAR>N((t.0R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>s(RRRR
RR]RRR1RRR(R!R((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_nullable_reflections
cCs|jdtjjdS(NRC(RRRR8(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(NRpiRA(RRRRpRRRRRRRRA(R!RRpRRRR((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(NRRARRq(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(NRCRR(RRRR8(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(NRCtconstrained_columnsR<RGRARK(
RRR;RHRRtget_pk_constraintRARRR6treflects_pk_namestfail_if(
R!RCRR;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(NRC(RRRR8(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_keysRA(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(NRCiRARBtreferred_schematreferred_tabletreferred_columnsR<RR@RI(RRR;RHRRRR6RYR.tget_foreign_keysRAtnamed_constraintsRRtimplicitly_named_constraintsRR5(
R!RCRR;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(NRC(RRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt!test_get_foreign_keys_with_schemarsc	CsK|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}t
|d|j	t
|dd	gt
|d
d
gdS(Ns%s.local_tables%s.remote_tables%s.remote_table_2iiRRRRRRPRCRR(RRRRbRcRR8RRRARR(	R!RORQRSRtlocal_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(NtxRRRDRtx_idsx.idRAtxidttesti
tuseri2R>ttidstable.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
RRZRRR]tForeignKeyConstraintt
create_allRRRRR1(R!R*RR((Rs[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRs8	
#cCsog|D]}|d^q}xK|D]C}||j|d}x#|D]}t||||qHWq$WdS(NRA(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;RCtuniqueR=R?tcolumn_namesR}RAR<R~(RRRtget_indexesR]R(R!RCRRRR((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(NRC(RRRR8(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(NRRAt
autoload_withii(RRRRR]RRRRRRtlistRRA(R!ttnametixnameRRRRR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_noncol_indexs	cCs|jdddS(NRTRW(R!(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_noncol_index_no_pkscCs|jdddS(NRVRX(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(NRRityRts+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_2RARiR(
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(NRptduplicates_indexRARRr(RRtget_unique_constraintstpopR5R(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(NRptdialect_optionsRARsRRqR(RRRR+R5RR](R!RRtindtidx((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_table_indexes;s
&
cCs|jdtjjdS(NRC(R'RRR8(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}|rt||t|tndS(Ntunique_aRARRtunique_a_b_cRR_tunique_c_a_btunique_asc_keytascRsi.have.dotss
i have spacesttesttbliiRCR)R(Rtoperatort
itemgetterRRRRZRR
tappend_constraintRxRRRR*RRR+R5taddRRRRAtconstraintsRt
difference(R!RCtuniquest	orig_metaRtuct	inspectorR,tnames_that_duplicate_indextorigR-tdupetreflected_metadataR1t	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(NRC(RKRRR8(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 < 5RAtcc1sa = 1 OR (a > 2 AND a < 5)tcc2RCRcSs%djtjd|jtjS(Nt sand|\d|=|a|or|<|>(tjointretfindalltlowertI(tsqltext((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt	normalizesRWsa > 1 and a < 5sa = 1 or a > 2 and a < 5(RRRR
RZtCheckConstraintRRRRtget_check_constraintsR:R;R(R!RCRARCR,RXtitem((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRKs(	
	2cCsl|j}d}d}t|j}|j|d|}|j||j|d|}|j|dS(NRRRC(RRRtget_view_definitionR(R!RCRt
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(Ra(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_definitionscCs|jdtjjdS(NRC(RaRRR8(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!RRCRRtoid((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_table_oids	cCs|jddS(NR;(Rh(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oidscCs|jddtjjdS(NR;RC(RhRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oid_with_schemascCs_|j}t|j}x@d	d
dgD]/\}}|j|}d|D|}q(WdS(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<RHRGRERFcSsi|]}||dqS(RA((RR_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys
<dictcomp>s	N(R;R<(RHRG(RERF(RRRR(R!RRRtcnameRtid_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_autoincrement_cols	N(`R$R%R5trun_insertstrun_deletesRR&R'R3RR4RjReRhRR6tschema_reflectionRRRtprovide_metadataRRRRyRzRttable_reflectionRt!foreign_key_constraint_reflectionRtcomment_reflectionRR7RRRRgRRRRRRRRRRRiRRRRRt!primary_key_constraint_reflectionRRRRRRRaRt1foreign_key_constraint_option_reflection_ondeleteRt1foreign_key_constraint_option_reflection_onupdateRRRRRdRRR!R"R#tindexes_with_expressionsR&tunique_constraint_reflectionR(R.R2R3R'tcheck_constraint_reflectionRLRMRKRaRbRctonly_onRhRiRjRm(((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.pyRscCscttj}ttddt|dt}|jd}ttj}|jdddS(NRRtautoloadR~tonlycSs|jdkS(NR~R(R~R(RU(RAtm((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt<lambda>,R:(RRRRRRRtreflect(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(NR~Rii(R~R(RRRRRURtupper(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.pyR|s
	((R:RSR/RZR:RRRRRRRRCRRR	R
RRRR
RRRRRtengine.reflectionRRRtsql.elementsRR5RR;t
TablesTestRR(R|t__all__(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt<module>s@(