/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing
NameSizeModeActions
plugin/-0755rm
suite/-0755rm
assertions.py180170644editdlrm
assertions.pyc225090644editdlrm
assertions.pyo207830644editdlrm
assertsql.py133980644editdlrm
assertsql.pyc153670644editdlrm
assertsql.pyo150860644editdlrm
config.py26800644editdlrm
config.pyc41430644editdlrm
config.pyo40570644editdlrm
engines.py104370644editdlrm
engines.pyc154460644editdlrm
engines.pyo152770644editdlrm
entities.py32030644editdlrm
entities.pyc33140644editdlrm
entities.pyo33140644editdlrm
exclusions.py127650644editdlrm
exclusions.pyc199080644editdlrm
exclusions.pyo197260644editdlrm
fixtures.py108140644editdlrm
fixtures.pyc165860644editdlrm
fixtures.pyo165020644editdlrm
mock.py8930644editdlrm
mock.pyc7800644editdlrm
mock.pyo7800644editdlrm
pickleable.py26930644editdlrm
pickleable.pyc78860644editdlrm
pickleable.pyo78860644editdlrm
profiling.py85130644editdlrm
profiling.pyc87670644editdlrm
profiling.pyo87670644editdlrm
provision.py132630644editdlrm
provision.pyc168660644editdlrm
provision.pyo168660644editdlrm
replay_fixture.py58750644editdlrm
replay_fixture.pyc76650644editdlrm
replay_fixture.pyo76650644editdlrm
requirements.py268610644editdlrm
requirements.pyc455180644editdlrm
requirements.pyo455180644editdlrm
schema.py37120644editdlrm
schema.pyc36450644editdlrm
schema.pyo36450644editdlrm
util.py77380644editdlrm
util.pyc111660644editdlrm
util.pyo111240644editdlrm
warnings.py12980644editdlrm
warnings.pyc14020644editdlrm
warnings.pyo14020644editdlrm
__init__.py23620644editdlrm
__init__.pyc25600644editdlrm
__init__.pyo25600644editdlrm
Edit: /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyc (11166B)
ó ÃÌ4]c@sŠddlZddlZddlZddlZddlZddlZddlmZddlmZddlm Z ddlm Z ddlm Z e r´d„Z e Z Zn.e rÐ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(t defaultdict(tjython(tpy2k(tpypycGs/tjƒtjdƒtjƒtjƒdS(s aggressive gc.collect for tests.gš™™™™™¹?i(tgctcollectttimetsleep(targs((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytjython_gc_collects     cGstjƒtjƒdS(N(RR(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytpypy_gc_collect$s cCsdS(N((((sJ/opt/alt/python27/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(sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytBt( tsetRtcPickletaddt ImportErrortpickletrangetHIGHEST_PROTOCOLtloads(tpicklersRR((RRsJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR1s      cCsNt|tƒrt||ƒS|tjdd|ƒjtjƒtd|ƒS(Nt1t0i (t isinstancetfloattroundtdecimaltDecimalt to_integralt ROUND_FLOORtpow(tvaluetprec((sJ/opt/alt/python27/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((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR+Ps cCsFtjdt|ƒdƒ}ttj|ƒƒ|}|j|ƒ|S(Nii(R,trandinttlenR*RR+tremove(R/tindextitem((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytpopUs cCsttj||ƒƒS(N(R)Rtunion(R/tother((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR7[scCsttj||ƒƒS(N(R)Rt difference(R/R8((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR9^scCsttj||ƒƒS(N(R)Rt intersection(R/R8((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR:ascCs t|ƒS(N(R)(R/((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytcopyds(t__name__t __module__R+R6R7R9R:R;(((sJ/opt/alt/python27/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((sJ/opt/alt/python27/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(R2R*RR9R:(telementstelemtsubsett sub_ordering(t_all_orderingstedges(sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyRN{s (RRRR.(RARJRDRE((RNROsJ/opt/alt/python27/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((sJ/opt/alt/python27/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(tctxRXtargtkwtobjtresultR_traise_((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytrun_as_contextmanagers  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((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pys ¼s ((tresults((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytrowset¶scCstst|ƒ‚dS(N(R?tAssertionError(tmsg((sJ/opt/alt/python27/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( RRoRpt sqlalchemyRqtMetaDatatdbtgetattrR]Rrtdrop_all_tables( RXR RbRoRpRqRrR/t prev_meta((sJ/opt/alt/python27/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(Roiÿÿÿÿ(tinspectcs8z|||ŽSWdtˆjˆˆjƒdˆƒXdS(Nt include_names(RwRu(RXR Rb(RoRztnames(sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytgoÞs(RRoRsRzR(R|R}((RoRzR|sJ/opt/alt/python27/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((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyR‚ìs  cGs!tg|D]}||^q ƒS(N(Rg(R/tkeysRƒ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyt__call__òs(R<R=t__doc__R‚R…tget_all(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyRés  c Cs›ddlm}m}m}m}m}ddlm} m} |dk rYt |ƒ}n|j ƒ0} x&t |j d|ƒƒD] \} } | rÙ|dk r±| |kr±qn| j| || |ƒd|ƒƒƒq| r|jjsñqnx™| D]Ž\} }|dk r"| |kr"qøn|| |ƒ|d|ƒ|d|ƒd|ƒ}| j| ||jjg|jjgd|ƒƒƒqøWqqWWdQXdS(Niÿÿÿÿ(tColumntTabletIntegerRttForeignKeyConstraint(t DropTabletDropConstraintRqtxtyRY(RsRˆR‰RŠRtR‹tsqlalchemy.schemaRŒRR]Rtconnecttreversedtget_sorted_table_and_fkc_namestexecutetdialecttsupports_altertcRŽR(tenginet inspectorRqR{RˆR‰RŠRtR‹RŒRtconnttnametfkcstfkcttb((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyRwøs8( "     cst‡fd†ƒ}|S(Ncs#z|||ŽSWdˆjƒXdS(N(t_clear(RXRaRb(t event_cls(sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytdecorate's(R(R R¡((R sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pytteardown_events&s("R!RR,R^RRRtutilRRRRRR t gc_collectR R RRR(RR)RIRPRZRfRkRnRyR~RRR]RwR¢(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/util.pyts@                   .