VDHc @ sy d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z l Z e i e Z d e f d YZ d S( s If you have Ned Batchelder's coverage_ module installed, you may activate a coverage report with the --with-coverage switch or NOSE_WITH_COVERAGE environment variable. The coverage report will cover any python source module imported after the start of the test run, excluding modules that match testMatch. If you want to include those modules too, use the --cover-tests switch, or set the NOSE_COVER_TESTS environment variable to a true value. To restrict the coverage report to modules from a particular package or packages, use the --cover-packages switch or the NOSE_COVER_PACKAGES environment variable. .. _coverage: http://www.nedbatchelder.com/code/modules/coverage.html iN( t Plugin( t srct tolistt Coveragec B s_ e Z d Z e Z d Z d Z e i d Z d Z d Z d Z d Z d d Z RS( s8 If you have Ned Batchelder's coverage module installed, you may activate a coverage report. The coverage report will cover any python source module imported after the start of the test run, excluding modules that match testMatch. If you want to include those modules too, use the --cover-tests switch, or set the NOSE_COVER_TESTS environment variable to a true value. To restrict the coverage report to modules from a particular package or packages, use the --cover-packages switch or the NOSE_COVER_PACKAGES environment variable. i c C s t i | | | | i d d d d | i d d d d d | i d d d d | i d d d d d | i d d d d d d | i d d d | i d d d d d d | i d d d d S( Ns --cover-packaget actiont appendt defaultt NOSE_COVER_PACKAGEt destt cover_packagest helpsB Restrict coverage output to selected packages [NOSE_COVER_PACKAGE]s --cover-eraset store_truet NOSE_COVER_ERASEt cover_erases9 Erase previously collected coverage statistics before runs --cover-testst cover_testst NOSE_COVER_TESTSs: Include test modules in coverage report [NOSE_COVER_TESTS]s --cover-inclusivet cover_inclusivet NOSE_COVER_INCLUSIVEs Include all python files under working directory in coverage report. Useful for discovering holes in test coverage if not all files are imported by the test suite. [NOSE_COVER_INCLUSIVE]( R t optionst add_optiont get( t selft parsert env( ( s6 /usr/lib/python2.6/site-packages/nose/plugins/cover.pyR $ s" c C s t i | | | | i oA y d d k } Wq^ t j o t i d t | _ d SXn | | _ | i | _ | i | _ g | _ | i oI xF g } | i D] } | t | q ~ D] } | i i | q Wn | i | _ | i o t i d | i n d S( Nis8 Coverage not available: unable to import coverage modules. Coverage report will include only packages: %s( R t configuret enabledt coveraget ImportErrort logt errort Falset confR t coverEraseR t coverTestst coverPackagesR R t extendR t coverInclusivet info( R R t configR t _[1]t xt pkgs( ( s6 /usr/lib/python2.6/site-packages/nose/plugins/cover.pyR ? s( + c C sl t i d d d k } t i i | _ | i o t i d | i n | i d | i d S( Ns Coverage beginis1 Clearing previously collected coverage statisticss) #pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]( R t debugR t syst modulest keyst skipModulesR t eraset excludet start( R R ( ( s6 /usr/lib/python2.6/site-packages/nose/plugins/cover.pyt beginU s c C s t i d d d k } | i g } t i i D]* \ } } | i | | o | | q7 q7 ~ } t i d | | i | d | d S( Ns Coverage reportis&