ó J9•Qc@s“dZddlmZddlmZddlZddlZejeƒZ defd„ƒYZ dd d„ƒYZ d ej fd „ƒYZ dS( 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(tTestNt CollectOnlycBs5eZdZdZdZd„Zd„Zd„ZRS(sB Collect and output test names only, don't run any tests. s collect-onlyt collect_onlyc Cs?|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__tnameR RRR (((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(Ns Add 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 s  +