https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/sqlalchemy/testing/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/sqlalchemy/testing/util.pyc
�
���\c@s�ddlZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZe	r�d�ZeZ
Zn.er�d	�ZeZ
ZnejZ
d
�Zd�Zd�Zd
efd��YZd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zdefd��YZddd�Z d�Z!dS(i����Ni(t	decorator(tdefaultdict(tjython(tpy2k(tpypycGs/tj�tjd�tj�tj�dS(s aggressive gc.collect for tests.g�������?i(tgctcollectttimetsleep(targs((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytjython_gc_collects




cGstj�tj�dS(N(RR(R	((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytpypy_gc_collect$s
cCsdS(N((((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytlazy_gc-sc#s�t�}trCyddl}|j|�WqCtk
r?qCXnddl}|j|�xE|D]=�x4td|j�D] ��j��fd�fVq|WqcWdS(Ni����i����cs�j|��S(N(tdumps(td(tpickle_tprotocol(s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyt<lambda>Bs(	tsetRtcPickletaddtImportErrortpickletrangetHIGHEST_PROTOCOLtloads(tpicklersRR((RRs=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR1s	


cCsNt|t�rt||�S|tjdd|�jtj�td|�S(Nt1t0i
(t
isinstancetfloattroundtdecimaltDecimaltto_integraltROUND_FLOORtpow(tvaluetprec((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyt
round_decimalEs

	t	RandomSetcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs,ttj|��}tj|�t|�S(N(tlistRt__iter__trandomtshuffletiter(tselftl((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR*Ps
cCsFtjdt|�d�}ttj|��|}|j|�|S(Nii(R+trandinttlenR)RR*tremove(R.tindextitem((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytpopUs
cCsttj||��S(N(R(Rtunion(R.tother((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR6[scCsttj||��S(N(R(Rt
difference(R.R7((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR8^scCsttj||��S(N(R(Rtintersection(R.R7((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR9ascCs
t|�S(N(R((R.((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytcopyds(t__name__t
__module__R*R5R6R8R9R:(((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR(Os					cCs�tt�}x%|D]\}}||j|�qWxGt|�D]5\}}x&||D]}|||krXtSqXWqAWtSdS(sATrue if the given sorting conforms to the given partial ordering.N(RRRt	enumeratetFalsetTrue(ttuplestsorted_elementstdepstparenttchildtitnodetn((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytconforms_partial_orderinghscsVtt��x%|D]\}}�|j|�qW��fd��t�|��S(Nc3s�t|�dkr t|�Vnbx_|D]W}t|�j|g�}|j�|�s'x#�|�D]}|g|VqeWq'q'WdS(Ni(R1R)RR8R9(telementstelemtsubsettsub_ordering(t_all_orderingstedges(s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyRM{s
(RRRR-(R@RIRCRD((RMRNs=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytall_partial_orderingsvs
cCsLy
||_Wn8tk
rGtj|j|j||j|j�}nX|S(scReturn a function with a given __name__.

    Will assign to __name__ and return the original function if possible on
    the Python implementation, otherwise a new function will be constructed.

    This function should be phased out as much as possible
    in favor of @decorator.   Tests that "generate" many named tests
    should be modernized.

    (R;t	TypeErrorttypestFunctionTypet__code__t__globals__t__defaults__t__closure__(tfntname((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytfunction_named�s

%cOsr|j�}y-||||�}|jddd�|SWn2tj�}|j|�}|sf�qn|SnXdS(sRun the given function under the given contextmanager,
    simulating the behavior of 'with' to support older
    Python versions.

    This is not necessary anymore as we have placed 2.6
    as minimum Python version, however some tests are still using
    this structure.

    N(t	__enter__t__exit__tNonetsystexc_info(tctxRWtargtkwtobjtresultR^traise_((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytrun_as_contextmanager�scCsd�|D�S(s�Converts the results of sql execution into a plain set of column tuples.

    Useful for asserting the results of an unordered query.
    cSsh|]}t|��qS((ttuple(t.0trow((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pys	<setcomp>�s	((tresults((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytrowset�scCstst|��dS(N(R>tAssertionError(tmsg((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytfail�sc	Os�ddlm}ddlm}ddlm}|j|j�}|d}t|dd�}||_	z|||�SWd|j
||j�||_	XdS(	s>Provide bound MetaData for a single test, dropping afterwards.i(tconfig(tenginesi����(tschemaitmetadataN(tRnRot
sqlalchemyRptMetaDatatdbtgetattrR\Rqtdrop_all_tables(	RWR	RaRnRoRpRqR.t	prev_meta((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytprovide_metadata�s
	cs?ddlm�ddlm�t���fd��}|S(siForce the given table names to be dropped after test complete,
    isolating for foreign key cycles

    i(Rni����(tinspectcs8z|||�SWdt�j��j�d��XdS(Nt
include_names(RwRu(RWR	Ra(RnRztnames(s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytgo�s(RrRnRsRzR(R|R}((RnRzR|s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytforce_drop_names�stadictcBs&eZdZd�Zd�ZeZRS(s,Dict keys available as attributes.  Shadows.cCs1y||SWntk
r,tj||�SXdS(N(tKeyErrortdictt__getattribute__(R.tkey((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR��s
cGs!tg|D]}||^q
�S(N(Rf(R.tkeysR�((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyt__call__�s(R;R<t__doc__R�R�tget_all(((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR�s		cCs�ddlm}m}m}m}m}ddlm}	m}
|dk	rYt
|�}n|j��0}x&t|j
d|��D]\}}
|r�|dk	r�||kr�q�n|j|	|||�d|���q�|
r�|jjs�q�nx�|
D]�\}}|dk	r"||kr"q�n|||�|d|�|d|�d|�}|j|
||jjg|jjgd|���q�Wq�q�WWdQXdS(Ni����(tColumntTabletIntegerRttForeignKeyConstraint(t	DropTabletDropConstraintRptxtyRX(RsR�R�R�RtR�tsqlalchemy.schemaR�R�R\Rtconnecttreversedtget_sorted_table_and_fkc_namestexecutetdialecttsupports_altertcR�R�(tenginet	inspectorRpR{R�R�R�RtR�R�R�tconnttnametfkcstfkcttb((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyRw�s8("	cst�fd��}|S(Ncs#z|||�SWd�j�XdS(N(t_clear(RWR`Ra(t	event_cls(s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytdecorate's(R(R�R�((R�s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytteardown_events&s("R RR+R]RRQtutilRRRRRR
t
gc_collectRRRRR'RR(RHRORYReRjRmRyR~R�RR\RwR�(((s=/usr/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyt<module>s@		
	
				
								.

https://t.me/AnonymousX5 - 2025