ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ Sc@sdZddlZddlZddlZddlZddlmZddlmZm Z ej e Z defdYZ dS(sIf 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-package`` switch or the NOSE_COVER_PACKAGE environment variable. .. _coverage: http://www.nedbatchelder.com/code/modules/coverage.html iN(tPlugin(tsrcttolisttCoveragecBsqeZdZeZdZdZeZdZ dZ iZ dZ dZ dZdZdZddZRS( sL Activate a coverage report using Ned Batchelder's coverage module. ic Cstt|j|||jdddd|jddddd d d |jd dd d|jdddd d|jddd ddd|jdd d|jdddddd|jdd d|jddd ddd|jdd d|jddd d|jddd d d!|jd"ddd|jd#d$dd%dd&d d'|jd(dd d|jd)dd*d d+|jd,dd d|jd-dd.d d/|jd0ddd|jd1d2dd3dd4d d5d6S(7s. Add options to command line. s--cover-packagetactiontappendtdefaulttNOSE_COVER_PACKAGEtmetavartPACKAGEtdesttcover_packagesthelpsBRestrict coverage output to selected packages [NOSE_COVER_PACKAGE]s --cover-eraset store_truetNOSE_COVER_ERASEt cover_erases9Erase previously collected coverage statistics before runs --cover-testst cover_teststNOSE_COVER_TESTSs:Include test modules in coverage report [NOSE_COVER_TESTS]s--cover-min-percentagetstoretcover_min_percentagetNOSE_COVER_MIN_PERCENTAGEsLMinimum percentage of coverage for tests to pass [NOSE_COVER_MIN_PERCENTAGE]s--cover-inclusivetcover_inclusivetNOSE_COVER_INCLUSIVEsInclude 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]s --cover-htmltNOSE_COVER_HTMLt cover_htmls!Produce HTML coverage informations--cover-html-dirtNOSE_COVER_HTML_DIRtcovertcover_html_dirtDIRs(Produce HTML coverage information in dirs--cover-branchestNOSE_COVER_BRANCHEStcover_branchess@Include branch coverage in coverage report [NOSE_COVER_BRANCHES]s --cover-xmltNOSE_COVER_XMLt cover_xmls Produce XML coverage informations--cover-xml-filetNOSE_COVER_XML_FILEs coverage.xmltcover_xml_filetFILEs(Produce XML coverage information in fileN(tsuperRtoptionst add_optiontget(tselftparsertenv((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyR%#sXc Cscy|jjdWntk r'nXtt|j|||jrNdS|jry.ddl}t |dst dnWqt k rt j dt |_dSXn||_|j|_|j|_g|_|jrSt|jttfr |j}n |jg}x:g|D]}t|^q D]}|jj|q6Wn|j|_|jr~t jd|jnd|_|jr|j |_t j!d|jn|j"|_#d|_$|j%rt&|j%j'd |_(n|j)r|j*|_$t j!d |j$n|jr_t+|jd<|jd t d |j#d dd|j|_,ndS(s# Configure plugin. tactiveNitcoverages Unable to import coverage modules8Coverage not available: unable to import coverage modules.Coverage report will include only packages: %ss#Will put HTML coverage report in %st%s"Will put XML coverage report in %st auto_datatbrancht data_suffixtsource(-tstatustpoptKeyErrorR$Rt configuretworkertenabledR,thasattrt ImportErrortlogterrortFalsetconfRt coverEraseRt coverTestst coverPackagesR t isinstancetlistttupleRtextendRtcoverInclusivetinfotNonet coverHtmlDirRRtdebugRt coverBranchest coverXmlFileRtinttrstriptcoverMinPercentageR R"tTruet coverInstance(R(R%R=R,R txtpkgs((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyR5]s\              &              cCstjdtjj|_|jrStjd|jj|jj n|jj d|jj |jj dS(s7 Begin recording coverage information. sCoverage begins1Clearing previously collected coverage statisticss)#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]N( R:RItsystmodulestkeyst skipModulesR>RPtcombineterasetexcludetloadtstart(R(((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pytbegins     c CsHtjd|jj|jj|jjgtjjD]$\}}|j ||rD|^qD}tjd||jj |d|ddl }|j rtjdy|jj ||j Wq|jjk r}tjdt|qXn|jrltjdy|jj||jWql|jjk rh}tjd t|qlXn|jrDtj}|jj |d|d }d } tj||j} | dkrtj| |j} n| r4t| jd } | |jkrAtjd |jtjdqAqDtjdndS(s. Output code coverage report. sCoverage reports&Coverage report will cover modules: %stfileiNsGenerating HTML coverage reports"Failed to generate HTML report: %ssGenerating XML coverage reports!Failed to generate XML report: %ss@-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?\s+(\d+)%\s+\d*\s{0,1}$sM-------\s[\w./]+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?\s+(\d+)%(?:\s+[-\d, ]+)\s{0,1}$is3TOTAL Coverage did not reach minimum required: %d%%isGNo total percentage was found in coverage output, something went wrong.(R:RIRPtstopRWtsaveRSRTtitemstwantModuleCoveragetreportR,RHt html_reporttmisctCoverageExceptiontwarningtstrRKt xml_reportRNtStringIOtretsearchtgetvalueRGRLtgroupsR;texit( R(tstreamtnametmoduleRTR,tetftmultiPackageRetsinglePackageRetmt percentage((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyRbsJ              cCs-t|ds#tjd|tSt|j}| sI|jd r]tjd|tS|jrxf|jD]X}tj dtj ||rp|j s|j j j| rptjd|tSqpWn||jkrtjd|tS|j j j|r%|j r%tjd|tS|j S( Nt__file__sno coverage of %s: no __file__s.pys$no coverage of %s: not a python files^%s\bscoverage for %ss0no coverage for %s: loaded before coverage startsno coverage for %s: is a test(R8R:RIR<RRxtendswithR@RjtfindalltescapeR?R=t testMatchRkRORV(R(RpRqt module_filetpackage((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyRas,    cCs_|jr[|jdr[|rQ|jrQx+|jD]}|j|r1tSq1WqXtSq[ndS(sdIf inclusive coverage enabled, return true for all source files in wanted packages. s.pyN(RERyR@t startswithRORG(R(R]R~twant((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pytwantFiles   N(t__name__t __module__t__doc__R<R?RGR@RPR>RNtscoreR2R%R5R\RbRaR(((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyRs : 5  6 (RtloggingRjRSRitnose.plugins.baseRt nose.utilRRt getLoggerRR:R(((sC/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/cover.pyt s