/usr/lib/python2.6/site-packages/nose/plugins
NameSizeModeActions
attrib.py78100644editdlrm
attrib.pyc74280644editdlrm
attrib.pyo74280644editdlrm
base.py313840644editdlrm
base.pyc368100644editdlrm
base.pyo368100644editdlrm
builtin.py7920644editdlrm
builtin.pyc13690644editdlrm
builtin.pyo13690644editdlrm
capture.py27800644editdlrm
capture.pyc45650644editdlrm
capture.pyo45650644editdlrm
cover.py64160644editdlrm
cover.pyc62130644editdlrm
cover.pyo62130644editdlrm
debug.py16790644editdlrm
debug.pyc24810644editdlrm
debug.pyo24810644editdlrm
deprecated.py16390644editdlrm
deprecated.pyc23850644editdlrm
deprecated.pyo23850644editdlrm
doctests.py91470644editdlrm
doctests.pyc98910644editdlrm
doctests.pyo98910644editdlrm
errorclass.py64380644editdlrm
errorclass.pyc80370644editdlrm
errorclass.pyo80370644editdlrm
failuredetail.py15640644editdlrm
failuredetail.pyc23340644editdlrm
failuredetail.pyo23340644editdlrm
isolate.py36740644editdlrm
isolate.pyc47290644editdlrm
isolate.pyo47290644editdlrm
manager.py143300644editdlrm
manager.pyc183700644editdlrm
manager.pyo183700644editdlrm
plugintest.py79940644editdlrm
plugintest.pyc96440644editdlrm
plugintest.pyo96440644editdlrm
prof.py47440644editdlrm
prof.pyc49330644editdlrm
prof.pyo49330644editdlrm
skip.py15720644editdlrm
skip.pyc22890644editdlrm
skip.pyo22890644editdlrm
testid.py48710644editdlrm
testid.pyc54790644editdlrm
testid.pyo54790644editdlrm
__init__.py81690644editdlrm
__init__.pyc84120644editdlrm
__init__.pyo84120644editdlrm
Edit: /usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyc (9644B)
Ńņ ā÷Gc @s dZddkZddkZddklZyddklZWn#ej oddklZnXddgZde fd„ƒYZ de fd „ƒYZ d „Z d „Z d „Zd „Zd„Zd„Zd„ZedjoddkZeiƒndS(s> Plugin tester ------------- Utilities for testing plugins. i’’’’N(twarn(tStringIOt PluginTestertruncBsSeZdZdZdZdZhZdZgZ dZ d„Z d„Z d„Z RS(szA mixin for testing nose plugins in their runtime environment. Subclass this and mix in unittest.TestCase to run integration/functional tests on your plugin. When setUp() is called, the stub test suite is executed with your plugin so that during an actual test you can inspect the artifacts of how your plugin interacted with the stub test suite. Class Variables --------------- - activate - the argument to send nosetests to activate the plugin - suitepath - if set, this is the path of the suite to test. otherwise, you will need to use the hook, makeSuite() - plugins - the list of plugins to make available during the run. Note that this does not mean these plugins will be *enabled* during the run -- only the plugins enabled by the activate argument or other settings in argv or env will be enabled. - args - a list of arguments to add to the nosetests command, in addition to the activate argument - env - optional dict of environment variables to send nosetests cCs t‚dS(s»returns a suite object of tests to run (unittest.TestSuite()) If self.suitepath is None, this must be implemented. The returned suite object will be executed with all plugins activated. It may return None. Here is an example of a basic suite object you can return :: >>> import unittest >>> class SomeTest(unittest.TestCase): ... def runTest(self): ... raise ValueError("Now do something, plugin!") ... >>> unittest.TestSuite([SomeTest()]) # doctest: +ELLIPSIS ]> N(tNotImplementedError(tself((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt makeSuiteAsc CsŻddkl}ddkl}ddkl}d }tƒ}|d|id|d|d|i ƒƒ}|i d j o|i |_ n|i p|i ƒ}n|d|i d |d |d tƒ|_t|ƒ|_d S( s7execute the plugin on the internal test suite. i’’’’(tConfig(t TestProgram(t PluginManagertenvtstreamtpluginstargvtconfigtsuitetexitN(t nose.configRt nose.coreRtnose.plugins.managerR tNoneRR R t ignoreFilest suitepathRR tFalsetnosetAccessDecoratortoutput(RRRR RR tconf((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt _execPluginUs   cCsbd|ig|_|io|ii|iƒn|io|ii|iƒn|iƒdS(sVruns nosetests with the specified test suite, all plugins activated. t nosetestsN(tactivateR targstextendRtappendR(R((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytsetUpjs   N(t__name__t __module__t__doc__RRRRR R R RRRR"(((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyRs#  RcBs8eZdZdZd„Zd„Zd„Zd„ZRS(cCs6||_|idƒ|iƒ|_|idƒdS(Ni(R tseektreadt_buf(RR ((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt__init__zs  cCs ||ijS(N(R((Rtval((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt __contains__scCs|iS(N(R (R((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt__iter__scCs|iS(N(R((R((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyt__str__ƒsN( R#R$RR R(R)R+R,R-(((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pyRws    ccsog}xI|itƒD]8}|i|ƒ|iƒpdi|ƒVg}qqW|odi|ƒVndS(Nt(t splitlinestTrueR!tstriptjoin(ttexttblocktline((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytblankline_separated_blocks‡s  cCsftidtitiBtiBƒ}g}x-t|ƒD]}|i|id|ƒƒq6Wdi|ƒS(Nsß # Grab the traceback header. Different versions of Python have # said different things on the first traceback line. ^(?P Traceback\ \( (?: most\ recent\ call\ last | innermost\ last ) \) : ) \s* $ # toss trailing whitespace on the header. (?P .*?) # don't blink: absorb stuff until... ^ (?P \w+ .*) # a line *starts* with alphanum. s\g\n...\n\gR.( tretcompiletVERBOSEt MULTILINEtDOTALLR6R!tsubR2(toutt traceback_retblocksR4((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytremove_stack_traces’s  cCs,tidtitiBƒ}|id|ƒS(Nsü # Cut the file and line no, up to the warning name ^.*:\d+:\s (?P\w+): \s+ # warning category (?P.+) $ \n? # warning message ^ .* $ # stack frame s\g: \g(R7R8R9R:R<(R=twarn_re((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytsimplify_warnings¦scCstidd|ƒS(NsRan (\d+ tests?) in [0-9.]+ssRan \1 in ...s(R7R<(R=((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytremove_timings±scCs.t|ƒ}t|ƒ}t|ƒ}|iƒS(s6Modify nose output to make it easy to use in doctests.(R@RBRCR1(R=((s;/usr/lib/python2.6/site-packages/nose/plugins/plugintest.pytmunge_nose_output_for_doctest¶s   c Os}ddkl}ddkl}ddkl}tƒ}d|jod|idgƒ}t|t ƒo|d|ƒ}n|idhƒ}|d|d|ƒ|ds(   b    <