�9�c@s�dZddlmZddlmZddlZddlZeje�Z defd��YZ
ddd��YZd ejfd
��YZdS(s
This plugin bypasses the actual execution of tests, and instead just collects
test names. Fixtures are also bypassed, so running nosetests with the
collection plugin enabled should be very quick.
This plugin is useful in combination with the testid plugin (``--with-id``).
Run both together to get an indexed list of all tests, which will enable you to
run individual tests by index number.
This plugin is also useful for counting tests in a test suite, and making
people watching your demo think all of your tests pass.
i�(tPlugin(tTestNtCollectOnlycBs5eZdZdZdZd�Zd�Zd�ZRS(sB
Collect and output test names only, don't run any tests.
scollect-onlytcollect_onlycCs?|jdddd|jd|jd�dd|j��d S(
s&Register commandline options.
s--collect-onlytactiont
store_truetdesttdefaulttNOSE_COLLECT_ONLYthelps&Enable collect-only: %s [COLLECT_ONLY]N(t
add_optiont enableOpttgetR (tselftparsertenv((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pytoptionss cCs#tjd�t|j�|_dS(s8Install collect-only suite class in TestLoader.
sPreparing test loaderN(tlogtdebugtTestSuiteFactorytconft
suiteClass(R
tloader((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pytprepareTestLoader&s
cs9tjd��t�t�s#dS��fd�}|S(s;Replace actual test with dummy that always passes.
sPreparing test case %sNcsd�jjj��|j���jjj��|j���jjj��|j��dS(N(Rtpluginst startTestt
addSuccesststopTest(tresult(R
ttest(s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pytrun4s
(RRt
isinstanceR(R
RR((R
Rs8/sys/lib/python2.7/site-packages/nose/plugins/collect.pytprepareTestCase-s
(t__name__t
__module__t__doc__tnameRRRR (((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyRs
RcBs#eZdZd�Zdd�ZRS(s7
Factory for producing configured test suites.
cCs
||_dS(N(R(R
R((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyt__init__DscKst|d|j�S(NR(t TestSuiteR(R
tteststkw((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyt__call__Gs((R!R"R#R%R)(((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyR@s R&cBs&eZdZddd�Zd�ZRS(s�
Basic test suite that bypasses most proxy and plugin calls, but does
wrap tests in a nose.case.Test so prepareTestCase will be called.
cCsH||_t|�r!|�}ntjd|�tjj||�dS(Ns
TestSuite(%r)(RtcallableRRtunittestR&R%(R
R'R((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyR%Ps
cCsXtjd|�t|tj�r5|jj|�n|jjt|d|j��dS(NsAdd test %stconfig( RRRR+R&t_teststappendRR(R
R((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pytaddTestXs(N(R!R"R#tNoneR%R/(((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyR&Ks((
R#tnose.plugins.baseRt nose.caseRtloggingR+t getLoggerR!RRRR&(((s8/sys/lib/python2.7/site-packages/nose/plugins/collect.pyt<module>s+
|