/opt/alt/python27/lib/python2.7/site-packages/nose
NameSizeModeActions
ext/-0755rm
plugins/-0755rm
sphinx/-0755rm
tools/-0755rm
case.py131710644editdlrm
case.pyc150950644editdlrm
case.pyo150950644editdlrm
commands.py63100644editdlrm
commands.pyc61500644editdlrm
commands.pyo61500644editdlrm
config.py252360644editdlrm
config.pyc242570644editdlrm
config.pyo242570644editdlrm
core.py130930644editdlrm
core.pyc134690644editdlrm
core.pyo134690644editdlrm
exc.py3760644editdlrm
exc.pyc5890644editdlrm
exc.pyo5890644editdlrm
failure.py12490644editdlrm
failure.pyc20000644editdlrm
failure.pyo20000644editdlrm
importer.py59780644editdlrm
importer.pyc57620644editdlrm
importer.pyo57620644editdlrm
inspector.py69860644editdlrm
inspector.pyc60920644editdlrm
inspector.pyo60920644editdlrm
loader.py254910644editdlrm
loader.pyc189420644editdlrm
loader.pyo188950644editdlrm
proxy.py68790644editdlrm
proxy.pyc83950644editdlrm
proxy.pyo81910644editdlrm
pyversion.py74240644editdlrm
pyversion.pyc95370644editdlrm
pyversion.pyo95370644editdlrm
result.py67110644editdlrm
result.pyc70750644editdlrm
result.pyo70750644editdlrm
selector.py90900644editdlrm
selector.pyc92670644editdlrm
selector.pyo92670644editdlrm
suite.py223410644editdlrm
suite.pyc224620644editdlrm
suite.pyo224620644editdlrm
twistedtools.py55250644editdlrm
twistedtools.pyc63190644editdlrm
twistedtools.pyo63190644editdlrm
usage.txt44250644editdlrm
util.py201370644editdlrm
util.pyc216160644editdlrm
util.pyo216160644editdlrm
__init__.py4040644editdlrm
__init__.pyc7020644editdlrm
__init__.pyo7020644editdlrm
__main__.py1440644editdlrm
__main__.pyc3620644editdlrm
__main__.pyo3620644editdlrm
Edit: /opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyc (18942B)
Ñò À$TSc@sÒdZddklZddkZddkZddkZddkZddkZddkl Z ddk l Z l Z ddk lZlZddklZddklZdd klZlZlZdd klZlZdd klZlZlZlZl Z l!Z!l"Z"l#Z#l$Z$l%Z%dd k&l'Z'l(Z(l)Z)dd k l*Z*l+Z+ei,e-ƒZ.ei/i0Z1ei/i2Z3ei/i4Z5ei/i6Z7ei/i8Z9ddgZ:dei;fd„ƒYZ;e;Z<dS(sß Test Loader ----------- nose's test loader implements the same basic functionality as its superclass, unittest.TestLoader, but extends it by more liberal interpretations of what may be a test and how a test may be named. iÿÿÿÿ(t generatorsN(t isfunction(tunbound_methodtismethod(tFunctionTestCasetMethodTestCase(tFailure(tConfig(tImportertadd_patht remove_path(tdefaultSelectort TestAddress( t func_linenot getpackagetisclasst isgeneratort ispackagetregex_last_keyt resolve_namettransplant_functtransplant_classt test_address(tContextSuiteFactoryt ContextListt LazySuite(t sort_listt cmp_to_keyt TestLoadertdefaultTestLoadercBsæeZdZdZdZdZdZdZddddd„Z d„Z d„Z d„Z d„Z d„Zd„Zd„Zded „Zded „Zdd „Zd „Zd „Zdd„Zdd„Zd„Zd„ZRS(sATest loader that extends unittest.TestLoader to: * Load tests from test-like functions and classes that are not unittest.TestCase subclasses * Find and load test modules in a directory * Support tests that are generators * Support easy extensions of or changes to that behavior through plugins cCs|djo tƒ}n|djotd|ƒ}n|djo |i}n|djot|ƒ}nt|ƒo||ƒ}n||_||_tt |ƒƒ|_||_ |i ot ||ƒnt d|ƒ|_tgƒ|_tii|ƒdS(sInitialize a test loader. Parameters (all optional): * config: provide a `nose.config.Config`_ or other config class instance; if not provided a `nose.config.Config`_ with default values is used. * importer: provide an importer instance that implements `importFromPath`. If not provided, a `nose.importer.Importer`_ is used. * workingDir: the directory to which file and module names are relative. If not provided, assumed to be the current working directory. * selector: a selector class or instance. If a class is provided, it will be instantiated with one argument, the current config. If not provided, a `nose.selector.Selector`_ is used. tconfigN(tNoneRRt workingDirR RRtimportert op_normpatht op_abspathtselectortaddPathsR Rt suiteClasstsett _visitedPathstunittestRt__init__(tselfRR!R R$((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR*;s&           cCs•|iiotii||ƒS||id„}t|t|ƒƒ}| ot|dƒo dg}n|i ot |t |i ƒƒn|S(s_Override to select with selector, unless config.getTestCaseNamesCompat is True cSsQt||dƒ}t|ƒot||ƒ}nt|ƒptS|i|ƒS(N(tgetattrRRRRtFalset wantMethod(tattrtclstseltitem((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pytwantedls   trunTest( RtgetTestCaseNamesCompatR)RtgetTestCaseNamesR$tfiltertdirthasattrtsortTestMethodsUsingRR(R+t testCaseClassR3tcases((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR6es   cCs|djotS||ijS(N(RR-R((R+tpath((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyt _haveVisited}s cCs%|dj o|ii|ƒndS(N(RR(tadd(R+R=((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyt_addVisitedPath…s c #s²tid|ƒˆii}|i|ƒˆiiot|ˆiƒ}nti|ƒ}t |t ˆii ƒƒxr|D]j}|i dƒoq{nt t||ƒƒ‰tˆƒ}t}|ot}ˆiiˆƒ}nAtˆƒ}|o-|i dƒoq{nˆiiˆƒ}ntˆƒ} |o°ˆiˆƒ oŸˆiˆƒ|oN|iƒ|idƒoˆiˆdtƒVnˆiˆƒV|iƒqå| oˆiˆdtƒVqåˆi‡‡fd†ƒVq{q{Wg} x$|i|ƒD]} | i | ƒqÿWy| oˆi| ƒVnWn?t!t"fj o ‚n%ˆit#t$i%ƒŒgƒVnXˆiiox|D]} t&| ƒq‰Wn|i'|ƒdS(sÚLoad tests from the directory at path. This is a generator -- each suite of tests from a module or other file is yielded and is expected to be executed before the next file is examined. sload from dir %st.t_s.pyt discoveredcs ˆiˆƒS((tloadTestsFromDir((R+t entry_path(s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pytÃsN((tlogtdebugRtpluginstbeforeDirectoryR%R tostlistdirRRt testMatcht startswithR#top_joint op_isfileR-R$twantFiletop_isdirt wantDirectoryRR>R@t beforeContexttendswithtloadTestsFromNametTruetloadTestsFromFilet afterContextR&RDtappendtKeyboardInterruptt SystemExitRtsystexc_infoR tafterDirectory( R+R=RIt paths_addedtentriestentrytis_fileR3tis_dirt is_packagetteststtesttp((R+REs</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRD‰sj        ! c Csôtid|ƒy{g}|iii|ƒD] }||q-~}|otd|ƒ}|i|ƒSt|dƒi ƒt d|ƒ‚Wnbt t fj o ‚nHt iƒ}|it|d|d|dd|ddfƒgƒSXdS( s¸Load tests from a non-module file. Default is to raise a ValueError; plugins may implement `loadTestsFromFile` to provide a list of tests loaded from the file. sLoad from non-module file %strs!Unable to load tests from file %siiitaddressN(RGRHRRIRXR7RR&topentcloset ValueErrorR[R\R]R^R(R+tfilenamet_[1]RgRftexc((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRXÖs") cs1ˆ|‡‡fd†}ˆi|dˆdtƒS(sºLazy-load tests from a generator function. The generator function may yield either: * a callable, or * a function name resolvable within the same module c 3s¼ydx]|ƒD]R}ˆi|ƒ\}}t|ƒpt||ƒ}nt|d|d|ƒVq WWnQtj o ‚n=tiƒ}t|d|d|ddtˆƒƒVnXdS(Ntargt descriptoriiiRj( tparseGeneratedTesttcallableR,RR[R]R^RR(tgtmRgt test_funcRqRp(R+t generator(s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pytgenerateùs   tcontextt can_split(R&R-(R+RxtmoduleRy((R+Rxs</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pytloadTestsFromGeneratoròs csotˆdƒo ˆi}n|ƒ}ˆi}t||ƒ‰ˆ|‡‡fd†}ˆi|dˆdtƒS(sýLazy-load tests from a generator method. This is more complicated than loading from a generator function, since a generator method may yield: * a function * a bound or unbound method, or * a method name tim_classc 3sy¸x±|ƒD]¦}ˆi|ƒ\}}t|ƒpt|t||ƒƒ}nt|ƒot|d|d|ƒVq t|ƒot|d|d|ƒVq ttd|ƒVq WWnQtj o ‚n=t i ƒ}t|d|d|ddt ˆƒƒVnXdS( NRqRrRgs%s is not a callable or methodiiiRj( RsRtRR,RRRt TypeErrorR[R]R^R(RutcRgRwRqRp(RxR+(s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRys&     RzR{(R9R~t__name__R,R&R-(R+RxR0tinsttmethodRy((RxR+s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pytloadTestsFromGeneratorMethods    c s)tidˆƒg}g}g}| pˆiiˆƒoÏxŒtˆƒD]~}tˆ|dƒ}t|ƒo(ˆii|ƒo|i |ƒqÈqJt |ƒo$ˆii |ƒo|i |ƒqJqJWt |d„ƒt |t ƒt‡‡fd†||ƒ}ntˆdgƒ} |otii|ƒ}nx¢| D]š} tid| ƒtid|| tii| ƒƒˆiip!| ptii| ƒi|ƒo1tii| ƒo|iˆi| ƒƒqÜqBqBWx-ˆiiiˆ|ƒD]}|i |ƒqùWˆit|dˆƒƒS( sãLoad all tests from module and return a suite containing them. If the module has been discovered and is not test-like, the suite will be empty by default, though plugins may add their own tests. sLoad from module %scSs|iS((R(tx((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRFJscsˆi|dˆƒS(tparent(tmakeTest(tt(R+R|(s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRFLst__path__sLoad tests from module path %s?s!path: %s os.path.realpath(%s): %sRzN(RGRHR$t wantModuleR8R,RRt wantClassRZRt wantFunctionRR tmapRKR=trealpathRttraverseNamespaceRNtisdirtextendRDRItloadTestsFromModuleR&R( R+R|R=RCRft test_classest test_funcsR2Rgt module_pathst module_path((R|R+s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR’4sB     "c s†tid||ƒˆi}ˆiii||ƒ}|o ||ƒSt|dˆiƒ}|oî|io |i}nˆi ||ƒ\}}t |ƒoUt |ddƒ|i jo9t|tƒ o(t||i ƒ}t ||i ƒ}ntid|||ƒt|tƒo||gƒS|tˆi||ƒgd|ƒƒSn3|ioy‚|idjot|iƒ}n\ˆiii|i|iƒzˆii|i|iƒ}Wdˆiii|i|iƒXWn\ttfj o ‚nBtiƒ} |t| d| d| d d |iƒƒgƒSX|ioˆi|i|ƒSˆi||id |ƒSn |ioÜ|i‰|io`t ˆƒ} | djo0|tt!d |iˆfd |iƒƒgƒSˆi|id | ƒSt"ˆƒot#‡‡fd†ƒSt$ˆƒoˆi%ˆƒS|tt&dˆd |iƒƒgƒSn'|tt!d|d |iƒƒgƒSdS(sãLoad tests from the entity with the given name. The name may indicate a file, directory, module, or any object within a module. See `nose.util.split_test_name` for details on test name parsing. sload from %s (%s)R t __module__sparent %s obj %s module %sRzNiiiRjRCs>Can't find callable %s in file %s: file is not a python moduleR|cs ˆiˆƒS((RD((R=R+(s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRFÃssNo such file %ssUnresolvable test name %s('RGRHR&RRIRVR R tcalltresolveRR,RRt isinstanceRRRR‡R|RnRt beforeImportR!timportFromPatht afterImportR[R\R]R^ttotupleR’RRmRRRRPRXtOSError( R+tnameR|RCtsuitet plug_teststaddrR†tobjRptpackage((R+R=s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRVes€                    cCs{|iii||ƒ}|oF|\}}|o/|i|i|ƒtii|||ƒgƒSntii|||ƒS(sSLoad tests from all names, returning a suite containing all tests. (RRItloadTestsFromNamesR&R)R(R+tnamesR|tplug_resR¡((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR¦Ñs  !cCsžg}|ii}x$|i|ƒD]}|i|ƒq"W|ptt|ƒi|ƒS|ig}tt|ƒi|ƒD] }||qz~ƒ|i|ƒS(s6Load tests from a unittest.TestCase subclass. (RRItloadTestsFromTestCaseRZtsuperRR‘R&(R+R;R<RItcaseRo((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR©ßs -c Cs||id„}g}t|t|ƒƒD]"}||it||ƒ|ƒq,~}x*|iii|ƒD]}|i|ƒqmW|i t |d|ƒƒS(s!Load tests from a test class that is *not* a unittest.TestCase subclass. In this case, we can't depend on the class's `__init__` taking method name arguments, so we have to compose a MethodTestCase for each method in the class that looks testlike. cSsQt||dƒ}t|ƒot||ƒ}nt|ƒptS|i|ƒS(N(R,RRRRR-R.(R/R0R1R2((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR3øs   Rz( R$R7R8R‡R,RRItloadTestsFromTestClassRZR&R(R+R0R3RoR«R<Rg((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR¬ðs>c Csy|i||ƒSWn‚ttfj o ‚nhtiƒ}yt|ƒ}Wn"tj o ‚nd}nXt|d|d|dd|ƒSXdS(NiiiRj(t _makeTestR[R\R]R^RRR(R+R¤R†RpR£((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR‡s  c CsŽg}yt|ƒ}Wn"tj o ‚nd}nXx-|iii||ƒD]}|i|ƒqTWy|o|i|ƒSWnMttfj o ‚n3t i ƒ}t |d|d|dd|ƒSXt |ƒo.|o't |tiƒ ot||ƒ}nt |tiƒo|St|ƒob|o)|i|ijot||iƒ}nt|tiƒo|i|ƒS|i|ƒSnõt|ƒog|djo |i}nt|tiƒo||iƒSt|ƒo|i||ƒSt|ƒSnt |ƒo\|o)|i|ijot||iƒ}nt|ƒo|i ||ƒSt!|ƒSnt t"d|d|ƒSdS(sVGiven a test object and its parent, return a test case or test suite. iiiRjsCan't make a test from %sN(#RR[RRRIR‡RZR&R\R]R^RRRšttypest ModuleTypeRR)tTestCaseRR—RRt issubclassR©R¬Rt __class__RR„RRR}RR(R+R¤R†R¢R£RgRp((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR­sZ  #(        cCsm|}|idƒ}x'|D]}|t||dƒ}}qW|djottd|ƒ}n||fS(s#Resolve name within module RAsNo such test %sN(tsplitR,RRRm(R+R R|R¤tpartstpartR†((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR™Os cCsˆt|tƒp|tƒ}}n[t|ƒdjo|dtƒ}}n0t|ƒdjpt‚|d|d}}||fS(sŽGiven the yield value of a test generator, return a func and args. This is used in the two loadTestsFromGenerator* methods. ii(RšttupletlentAssertionError(R+RgRwRq((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyRs[sN(RR—t__doc__RRR!R R$R&R*R6R>R@RDRXR}R„R-R’RVR¦R©R¬R‡R­R™Rs(((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyR,s0  )    M   ,1l     ; (=R¹t __future__RtloggingRKR]R)R®tinspectRtnose.pyversionRRt nose.caseRRt nose.failureRt nose.configRt nose.importerRR R t nose.selectorR R t nose.utilR RRRRRRRRRt nose.suiteRRRRRt getLoggerRRGR=tnormpathR"tabspathR#tjoinRORRRtisfileRPt__all__RR(((s</opt/alt/python27/lib/python2.7/site-packages/nose/loader.pyts6     F      ÿÿ@