%PDF- %PDF-
Mini Shell

Mini Shell

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

�
��4]c@s�ddlZddlZddlZddlmZddlmZddlmZddlmZddlm	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#fd��YZ$de
j#fd��YZ%de
j#fd��YZ&dddfZ'dS( i����Ni(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&eZeZed��Zd�ZRS(cCs5td|tdtdt�tdtd���dS(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	tComponentReflectionTestcBsZeZdEZZeZed��Zed��Z	ed��Z
ed��Zed��Zed��Z
ejjd��Zejjd��Zejjd��ZejdEd	dEd
��Zejjd��Zejjejjejjd����Zejjd
��Zejjejjd���Zejjd��Z ejjejj!d���Z"dEd�Z#ejjejj!d���Z$ejj%d��Z&ejj%ejj!d���Z'ejjejj%d���Z(dEd	d�Z)ejjd��Z*ejd��Z+ejjd��Z,ejjd��Z-ejjejd���Z.ejjejj!d���Z/ejj0d��Z1ejj0ejj%ejjd����Z2ejj%d��Z3ejj%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/���ZHejd0��ZIejjFd1��ZJejjFd2��ZKejjLejd3���ZMejjNd4��ZOejj0ejjNd5���ZPejj0d6��ZQejjNejj!d7���ZRejdEd8��ZSejjTd9��ZUejjTejj!d:���ZVejdEd;��ZWejdEd<��ZXejjd=��ZYejjejj!d>���ZZej[d?d@�ejdEdA���Z\dB�Z]ejj!dC��Z^ejjejdD���Z_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|d�tjjjr8|j|tjj�ndS(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}tjjjr�td|tdtjdt�tdtj	d�dt
�td	tjd�dt
�td
tjtj
d|dd
��d|dt�}nftd|tdtjdt�tdtj	d�dt
�td	tjd�dt
�d|dt�}td|tdtjdt�tdtjtj
d|��tdtjd��d|dt�td|tdtj�tdtjtj
|jj��tdtjd��tjddd�d|dt�td|tdtjdtdd�tdtjd�dd�td tjd�dd!�d|dd"�tjjjr�|dkr�td#|tdtjdt�tdtjd��td$t
d%tjj��dtdtjjj�q�td&|tdtjdt�td't
d(tjjj��tdtjd��d|dt�td)|tdtjdt�tdtjd��d|dt�ntjjjrL|j||�|sLtd*|td+tjd��dt�}td,|tdtjdt�td+tjd��dt�}td-|jjj��td.|jjj��qLntjjjrn|j||�n|r�tjj 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
Cs�tjd�r)idgd6dd6}nidgd6}td|tdtjd	t�td
tjd��tdtj�tjd
d
d
�tj	dd�|�}tj
jjr�tj
j
jr�tj|dtd��tj|dtd��ndS(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.pyRj�s,

	
cCsEtd|jj|jj�td|jj|jj|jj�dS(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.pyRe�scCs�x}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.pyRh�s


cCs2ttj�}|jtjj|j�k�dS(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|jtjjj�dS(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|�}|j�dd	g}tt|�|�n�|r�g|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_tablestmetaR�ttable_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|�dg�dS(NRp(RR�tget_temp_table_namesRR�(R!R�ttemp_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|�dg�dS(Nt
user_tmp_v(RR�tget_temp_view_namesRR�(R!R�R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_view_namesOscCs|j�dS(N(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_namesWscCs|jdd�dS(NR�R�(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_names_fks[scCs|j�dS(N(t_test_get_comments(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_comments`scCs|jtjj�dS(N(R�RRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_comments_with_schemadscCs�ttj�}t|jdd|�idd6�t|jdd|�idd6�tg|jdd|�D]"}i|dd6|dd6^qnidd6d	d6id
d6dd6idd6d
d6g�dS(NRLRCsthe test % ' " \ table commentttextR;RARMs
id commentRsdata % commentRs)Comment types type speedily ' " \ '' Fun!RN(RRRRtget_table_commentR5tget_columns(R!RCR�R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR�is#8cCs|jtjj�dS(N(R�RRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt test_get_table_names_with_schema�scCs|jdd�dS(NR�R�(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_names�scCs|jtjjdd�dS(NR�R�(R�RRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_names_with_schema�scCs|j�|jdd�dS(NR�R�(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_tables_and_views�s
cCs�ttj�}|jj|jj}}ddg}|dkrOddg}nt|j�}x�t|||f�D]}\}}	|}
|j	|d|
�}|j
t|�dkt|��x1t|	j
�D] \}}
t|
j||d�||d	j}|
j}t|tjj�r,|j}ntjd
�r_|tjtjfkr_tj}n|j
tt|j�j|j�jtjtjtjtjtjtj tj!g��dkd|
j|
j||d|f�|
j"s�q�q�WqtWdS(NR;RHR�R�R�RCiRAttypeRls%s(%s), %s(%s)(#RRRR�R;RHRR�tzipR�R�tlent	enumeratetcolumnsRRAt	__class__R�t
isinstanceRZRt
TypeEngineRvt	sql_typestDatetDateTimetsett__mro__tintersectionR
tNumerictTimeRt_BinaryR(R!RCR�R�R;t	addressesR�R�R�R�tschema_nametcolstitcoltctypet	ctype_def((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_columns�sH""	"	cCs|j�dS(N(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_columns�scGs{td|jgt|�D]\}}td||�^q�}|j�gt|jj�jd�D]}|d^qgS(NR�st%dR�(RRR�RtcreateRR�R�(R!RR�ttype_R�R_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_type_round_trip�s5
cCsJxC|jtjdd��D]&}t|jd�t|jd�qWdS(Nii(R�R�R�Rt	precisiontscale(R!ttyp((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_numeric_reflection�s"cCs0|jtjd��d}t|jd�dS(Ni4i(R�R�RRtlength(R!R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_varchar_reflection�sc	Cs�td|jtdtdt�tdtdt��}|j�ttd�t	|jj
�jd�D��itd6td6�dS(NR�taR>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]R�RR1RR�R�(R!R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_nullable_reflection�s
cCs|jdtjj�dS(NRC(R�RRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_columns_with_schemascCs�t|j�}|jj}t|j�}|jd�}|jt|�dkt|��x5t|j	�D]$\}}t
|j||d�qkWdS(NRpiRA(RR�R�RpRR�R�R�R�R�RRA(R!R�RpR�R�R�R�((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(dddg�dS(NR�RARRq(RR�R�R(R!R�R�R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_view_columnsscCs|jdd�dS(NR�R�(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_columnsscCs |jdtjjdd�dS(NRCR�R�(R�RRR8(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|	dg�t	j
jj��t|dd�WdQXdS(NRCtconstrained_columnsR<RGRARK(
RR�R;RHRR�tget_pk_constraintRARRR6treflects_pk_namestfail_if(
R!RCR�R;R�R�t
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|j�dS(N(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_pk_constraint6scCs|jdtjj�dS(NRC(R�RRR8(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(
RR�R;RR�Rtsa_exctSADeprecationWarningtget_primary_keysRA(R!R�R;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|dd�WdQXt|d|�t|d|j�t|ddg�tjjj	r�t|d	d
g�q�n|j
|jd|�}	|	d}tjjj
��|j|ddk	�WdQXt|d|�t|d|j�t|ddg�t|d	dg�dS(NRCiRARBtreferred_schematreferred_tabletreferred_columnsR<R�R@RI(RR�R;RHRR�RR6RYR.tget_foreign_keysRAtnamed_constraintsR�Rtimplicitly_named_constraintsR�R5(
R!RCR�R;R�R�texpected_schematusers_fkeystfkey1t
addr_fkeys((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_foreign_keysMs,	

cCs|j�dS(N(R�(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_foreign_keysnscCs|jdtjj�dS(NRC(R�RRR8(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
|dtjj�t
|d|j	�t
|dd	g�t
|d
dg�|j|j	dtjj�}t
t|�d�|d}t
|d|j	�t
|dd	g�t
|d
d
g�dS(Ns%s.local_tables%s.remote_tables%s.remote_table_2iiR�R�R�RR�RPRCRR(R�RRRbRcRR8RR�RARR�(	R!RORQRSR�tlocal_fkeysR�tremote_fkeystfkey2((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt"test_get_inter_schema_foreign_keysws&


cCs|jdd�dS(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_ondelete�scCs|jdd�dS(NtonupdatesSET NULL(R(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt%test_get_foreign_key_options_onupdate�scs{|j}td|tdtdt�dt�td|tdtdt�tdttjddd	��td
td��dt�td|tdtdt�tdtd
�dt�tdt�tj	dgdgdd|�dt�|j
�t|j�}|j
d�dd�tt�fd��D��i�|j
d�dd�tt�fd��D��|�dS(NtxRRRDR�tx_idsx.idRAtxidttesti
tuseri2R>ttidstable.idtmyfkiR*c3s)|]}�|r|�|fVqdS(N((R�tk(topts(s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>�sc3s)|]}�|r|�|fVqdS(N((R�R(R(s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys	<genexpr>�s(RRRR
RRZRRR]tForeignKeyConstraintt
create_allRR�R�RR1(R!R*R�R�((Rs[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR�s8	
#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_indexes�s


cCs�|j}t|j�}|jdd|�}itd6ddgd6dd6itd6d	ddgd6d
d6g}|j||�dS(NR;RCtuniqueR=R?tcolumn_namesR}RAR<R~(RRR�tget_indexesR]R(R!RCR�R�RR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_indexes�s	

cCs|j�dS(N(R(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_indexes�scCs|jdtjj�dS(NRC(RRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_indexes_with_schema�scCs�|j}t|j�}|j|�}itd6|d6g}|j||�t||d|j�}tt|j	�d�t
t|j	�dj|�tt|j	�dj
|�dS(NRRAt
autoload_withii(RRR�RR]RRRR�RRtlistR�RA(R!ttnametixnameR�R�RRR�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_noncol_index�s	cCs|jdd�dS(NRTRW(R!(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_noncol_index_no_pkscCs|jdd�dS(NRVRX(R!(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_noncol_index_pksc	Cs�td|jtdtd��tdtd���tj|jdtd��tj|jdtd��|jj�t|jj	�}t
d��6t|jd�id	d
6dgd6dd
6g�WdQXdS(NR�RityRts+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R�RRR(R!R�((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt%test_reflect_expression_based_indexess$


cCs|j�dS(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]}|jdd�q%Wt|idgd6dd6g�dS(NRptduplicates_indexRARRr(RR�tget_unique_constraintstpopR5R(R!R�t	reflectedtrefl((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt&test_get_temp_table_unique_constraints0s

cCs�t|j�}|jd�}x|D]}|jdd�q%Wtg|D]}|ddkrI|^qIitd6dgd6dd6g�dS(NRptdialect_optionsRARsRRqR(RR�RR+R5RR](R!R�Rtindtidx((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_temp_table_indexes;s
&
cCs|jdtjj�dS(NRC(R'RRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt'test_get_unique_constraints_with_schemaNscCs�tidd6dgd6idd6dddgd6idd6dddgd6id	d6d
dgd6idd6dgd6id
d6dgd6gdtjd��}|j}td|tdtjd��tdtjd��tdtj�td
tjd��tdtjd��d|�}x2|D]*}|j	tj
d|d|d��q*W|j�t|j
�}t|jdd|�dtjd��}t�}xRt||�D]A\}	}
|
jdd�}|r�|j|�nt|	|
�q�Wt�}td|d|j
d|�}tg|jD]}
|
j^q-�}tg|jD]!}t|tj
�rR|j^qR�jdg�}|r�t||�t|t��ndS(Ntunique_aRAR�Rtunique_a_b_cR�R_tunique_c_a_btunique_asc_keytascRsi.have.dotss
i have spacesttesttbliiRCR)R(R�toperatort
itemgetterRRRRZRR
tappend_constraintRxRRR�R*R�R�R+R5taddRRRRAtconstraintsR�t
difference(R!RCtuniquest	orig_metaR�tuct	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|j�dS(N(t_test_get_check_constraints(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_check_constraints�scCs|jdtjj�dS(NRC(RKRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt!test_get_check_constraints_schema�sc	Cs|j}td|tdt��tjddd�tjddd�d|�|j�t|j�}t	|j
dd|�d	tjd��}d
�}g|D](}i|dd6||d�d6^q�}t
|idd6dd6idd6d
d6g�dS(Ntsa_ccR�sa > 1 AND a < 5RAtcc1sa = 1 OR (a > 2 AND a < 5)tcc2RCRcSs%djtjd|j�tj��S(Nt sand|\d|=|a|or|<|>(tjointretfindalltlowertI(tsqltext((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt	normalize�sRWsa > 1 and a < 5sa = 1 or a > 2 and a < 5(RRRR
RZtCheckConstraintRRR�R�tget_check_constraintsR:R;R(R!RCRARCR,RXtitem((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRK�s(	
	2cCsl|j}d}d}t|j�}|j|d|�}|j|�|j|d|�}|j|�dS(NR�R�RC(RRR�tget_view_definitionR�(R!RCR�t
view_name1t
view_name2R�tv1tv2((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_view_definition�s	
cCs|j�dS(N(Ra(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_view_definition�scCs|jdtjj�dS(NRC(RaRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt$test_get_view_definition_with_schema�st
postgresqlsPG specific featurecCsD|j}t|j�}|j||�}|jt|t��dS(N(RRR�t
get_table_oidR�R�tint(R!R�RCR�R�toid((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt_test_get_table_oid�s	cCs|jd�dS(NR;(Rh(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oid�scCs|jddtjj�dS(NR;RC(RhRRR8(R!((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_get_table_oid_with_schema�scCs_|j}t|j�}x@d	d
dgD]/\}}|j|�}d�|D�|}q(WdS(s�test 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|]}||d�qS(RA((R�R_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pys
<dictcomp>s	N(R;R<(RHRG(RERF(RRR�R�(R!R�R�RtcnameR�tid_((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyttest_autoincrement_col�s	N(`R$R%R5trun_insertstrun_deletesRR&R'R3RR4RjReRhRR6tschema_reflectionR�R�R�tprovide_metadataR�R�R�RyRzR�ttable_reflectionR�t!foreign_key_constraint_reflectionR�tcomment_reflectionR�R7R�R�R�RgR�R�R�R�R�R�R�R�R�R�RiR�R�R�R�R�t!primary_key_constraint_reflectionR�R�R�R�R�R�RaR�t1foreign_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	'
			tNormalizedNameTestcBs5eZdZeZed��Zd�Zd�ZRS(tdenormalized_namescCslttddt�|tdtdt��ttddt�|tdtdt�tdtd���dS(Ntt1tquoteRRtt2tt1idst1.id(RRRRR
R(RR((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyRscCscttj�}ttddt�|dt�}|jd}ttj�}|jdd��dS(NR�RtautoloadR~tonlycSs|j�dkS(NR~R�(R~R�(RU(RAtm((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyt<lambda>,R:(RRRRRRR�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!
cCs�gttj�j�D]}|j�dkr|^q}t|dj�|dj��t|dj�|dj��dS(NR~R�ii(R~R�(RRRR�RURtupper(R!R�t
tablenames((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR�/s
!(R}(	R$R%t__requires__RR&R'RR�R�(((s[/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_reflection.pyR|s
	((R:RSR/RZR:RRRRRRRRCRRR	R
R�RRR
RRRRR�tengine.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@����(

Zerion Mini Shell 1.0