/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/profiling.pyo (8767B)
ó ĆĢ4]c@sdZddlZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddlm Z dd lm Z dd lm Z yddlZWnek rĖdZnXdZdZd efd „ƒYZd d„Zejd d„ƒZdS(s§Profiling support for unit and performance tests. These are special purpose profiling methods which operate in a more fine-grained way than nose's profiling plugin. i’’’’Ni(tconfig(t gc_collecti(tjython(tpypy(tupdate_wrapper(twin32tProfileStatsFilecBs\eZdZd„Zed„ƒZd„Zd„Zd„Zd„Z d„Z d„Z RS( s°"Store per-platform/fn profiling results in a file. We're still targeting Py2.5, 2.4 on 0.7 with no dependencies, so no json lib :( need to roll something silly cCsÆtjdk otjj|_|jp?tjdk o?tjj|_tjj |ƒ|_ tjj |j ƒd|_ t jd„ƒ|_|jƒ|jr«|jƒndS(Ni’’’’cSs tjtƒS(N(t collectionst defaultdicttdict(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt:t(RtoptionstNonetforce_write_profilest force_writetwrite_profilestwritetostpathtabspathtfnametsplitt short_fnameRRtdatat_readt_write(tselftfilename((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt__init__0s   cCsūtjjdtjj}djgtjdd!D]}t|ƒ^q1ƒ}|g}|j|ƒt rx|jdƒnt rŽ|jdƒnt r¤|jdƒn|jtjj j rædnd ƒtjjƒ}|j|rēd pźd ƒdj|ƒS( Nt_t.iiRRtwint nativeunicodet dbapiunicodet cextensionst nocextensions(Rtdbtnametdrivertjointsyst version_infotstrtappendRRRtdialecttconvert_unicodet requirementst_has_cextensions(Rt dbapi_keytvt py_versiontplatform_tokenst _has_cext((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt platform_keyBs 2  cCs)t}||jko(|j|j|kS(N(t _current_testRR6(Rttest_key((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt has_stats[sc CsŚt}|j|}||j}d|kr=g|d<}n |d}d|krdd|d<}n |d}t|ƒ|k}|s²|j|ƒ|jr©|jƒnd}n|d||f}|dcd7<|S(Ntcountst current_countitlinenoi(R7RR6tlenR,RRR ( Rt callcountR8tper_fnt per_platformR:R;t has_counttresult((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyRBas$          cCs{t}|j|}||j}|d}|d}|t|ƒkrW|||dR8R?R@R:R;((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pytreplace|s      cCs d|jS(Ns # %s # This file is written out on a per-environment basis. # For each test in aaa_profiling, the corresponding function and # environment is located within this file. If it doesn't exist, # the test is skipped. # If a callcount does exist, it is compared to what we received. # assertions are raised if the counts do not match. # # To add a new callcount test, apply the function_call_count # decorator and re-run the tests using the --write-profiles # option - this file will be rewritten including the new count. # (R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt_header‰sc Csńyt|jƒ}Wntk r'dSXxøt|ƒD]Ŗ\}}|jƒ}| s5|jdƒriq5n|jƒ\}}}|j|}||}g|jdƒD]} t| ƒ^q„} | |d<|d|d¹sR:s %s %s %s (RRGRRDtsortedRR(RM(RRNR8R?R6R@RQ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyRÆs   "( t__name__t __module__t__doc__RtpropertyR6R9RBRCRDRR(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyR(s     gš™™™™™©?cs‡fd†}|S(s©Assert a target for a test case's function call count. The main purpose of this assertion is to detect changes in callcounts for various functions - the actual number is not as important. Callcounts are stored in a file keyed to Python version and OS platform information. This file is generated automatically for new tests, and versioned so that unexpected changes in callcounts will be detected. cs‡‡fd†}t|ˆƒS(Ncs'tdˆƒˆ||ŽSWdQXdS(Ntvariance(tcount_functions(targstkw(tfnRY(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pytwrapŹs(R(R]R^(RY(R]sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pytdecorateÉs((RYR_((RYsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pytfunction_call_count¾s c csptdkrtjdƒ‚ntjƒ rLtj rLtjdtjƒnt ƒtj ƒ}|j ƒdV|j ƒt j|dtjƒ}|j}tj|ƒ}|dkr½d}n |\}}d||fGH|jdƒ|jƒ|rlt||ƒ}t||ƒ|k}|s*tjrltjrCtj|ƒqitd||d|tjfƒ‚qlndS(NscProfile is not installedsŒNo profiling stats available on this platform for this function. Run tests with --write-profiles to add statistics to %s for this platform.tstreamsPstats calls: %d Expected %st cumulatives†Adjusted function call count %s not within %s%% of expected %s, platform %s. Rerun with --write-profiles to regenerate this callcount.id(tcProfileR Rt_skip_test_exceptiont_profile_statsR9Rt skip_testRRtProfiletenabletdisabletpstatstStatsR)tstdoutt total_callsRBt sort_statst print_statsRLtabsRRCtAssertionErrorR6( RYtprtstatsR>texpectedtexpected_counttline_notdeviancetfailed((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyRZÓs@           (RWRt contextlibRRjR)R RtutilRRRRRRct ImportErrorR R7RetobjectRR`tcontextmanagerRZ(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt s*       –