Ñò ]ÐKc@sddkZddkZddkZddklZddklZlZddk l Z ddk l Z l Z ddkZddklZddkZddd d gZd eifd „ƒYZd eifd„ƒYZdeifd„ƒYZd eifd„ƒYZeiƒZdeifd„ƒYZdefd„ƒYZdefd„ƒYZdei i!fd„ƒYZ"dS(iÿÿÿÿN(tdoctests(t ErrorClasstErrorClassPlugin(tPlugin(tsrct getpackage(tget_package_namesgenerate_numpy_api.pysscons_support.pys setupscons.pyssetup.pytNumpyDocTestFindercBseZd„Zd„ZRS(cCs |djotSti|ƒo|i|ijSti|ƒo|i|ijSti |ƒo|i|ijSti |ƒo|i|i ijSti |ƒdj o|ti |ƒjSt |dƒo|i|ijSt|tƒotStdƒ‚dS(sY Return true if the given object is defined in the given module. t __module__s"object must be a class or functionN(tNonetTruetinspectt isfunctiont__dict__t func_globalst isbuiltint__name__Rtisclasstismethodtim_classt getmodulethasattrt isinstancetpropertyt ValueError(tselftmoduletobject((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyt _from_module s" c Csítii||||||||ƒddkl}l} l} l} l} | |ƒoŽ|i o„x|i i ƒD]l\} }d|| f}||ƒp | |ƒo6|i ||ƒo#|i|||||||ƒqtqtWn| |ƒoô|i oêxç|i i ƒD]Ò\} }t |tƒot|| ƒ}nt |tƒot|| ƒi}n| |ƒp*| |ƒp| |ƒpt |tƒoF|i ||ƒo3d|| f} |i||| ||||ƒqqWndS(sm Find tests for the given object and any contained objects, and add them to `tests`. iÿÿÿÿ(t isroutineRtismoduleR Rs%s.%sN(tdoctestt DocTestFindert_findR RRRR Rt_recurseR titemsRRt staticmethodtgetattrt classmethodtim_funcR(RtteststobjtnameRt source_linestglobstseenRRRR Rtvalnametvaltvalname1((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR!Gs0 (  (RRRR!(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRs 'tNumpyDocTestCasecBseZdZd„ZRS(sNProxy for DocTestCase: provides an address() method that returns the correct address for the doctest case. Otherwise acts as a proxy to the test case. To provide hints for address(), an obj may also be passed -- this will be used as the test object for purposes of determining the test address, if it is provided. cCsk|ii}|ii}|dj oBt|ƒ}|dj o%|i|ƒ od||f}qgn|S(Ns%s.%s(t_dt_testR*tfilenameR Rt startswith(RR*R3tpk((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pytidƒs    (RRt__doc__R6(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR1xstNumpyOutputCheckercBseZd„ZRS(cCs<tii||||ƒ}|pd|jotSn|S(Ns#random(Rt OutputCheckert check_outputR (Rtwanttgott optionflagstret((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR:‘s    (RRR:(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR8scBs#eZddddddd„ZRS(it_c CsA||_||_tii||d|d|d|d|ƒdS(NR=tsetUpttearDowntchecker(t _result_vart _nose_objRt DocTestCaset__init__(RttestR=R@RARBR)t result_var((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRFŸs    N(RRR RF(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR1žs t NumpyDoctestcBsGeZdZeZeid„Zd„Zd„Z d„Z d„Z RS(t numpydoctestcCsti|||ƒdS(N(Rtoptions(Rtparsertenv((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRK¯scCs;ti|||ƒt|_tƒ|_tiƒ|_dS(N( Rt configureR t doctest_testsRtfinderRt DocTestParserRL(RRKtconfig((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRN²s  c csƒ|i|iƒptiid|ƒdSy|ii|ƒ}Wntj odSX|pdS|iƒt |i ƒ}xÿ|D]÷}|i pq„n|i p ||_ nt tii|i ƒƒ}htd6dd6dd6td6|_d|joR|idƒ}di|d ƒ}|d }t||ih|gƒ|i|        & cCstitdS(N(Rdtset_printoptionst print_state(R((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyt afterContextïscCs7tii|ƒ}|tjotStii||ƒS(N(RaRbtbasenamet_doctest_ignoretFalseRZtDoctesttwantFile(Rtfiletbn((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRwôs ( RRR*R tenabledRatenvironRKRNRoRrRw(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRI«s 4 tKnownFailureTestcBseZdZRS(s<Raise this exception to mark a test as a known failing test.(RRR7(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR|ûst KnownFailurecBsDeZdZeZeedddeƒZe i d„Z d„Z RS(s5Plugin that installs a KNOWNFAIL error class for the KnownFailureClass exception. When KnownFailureTest is raised, the exception will be logged in the knownfail attribute of the result, 'K' or 'KNOWNFAIL' (verbose) will be output, and the exception will not be counted as an error or failure.tlabelt KNOWNFAILt isfailurec Cs;d}|idddddd|i|tƒdd ƒdS( NtNOSE_WITHOUT_KNOWNFAILs--no-knownfailtactiont store_truetdestt noKnownFailtdefaultthelps7Disable special handling of KnownFailureTest exceptions(t add_optiontgetRu(RRLRMtenv_opt((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRK scCsB|ipdS||_t|dtƒ}|o t|_ndS(NR…(t can_configuretconfR%RuRz(RRKRŒtdisable((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRNs   ( RRR7R RzRR|Rut knownfailRaR{RKRN(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyR}s  tNumpyTestProgramcBseZd„ZRS(cCsª|idjo7tiid|iid|iid|iƒ|_n|iii |iƒ}|dj o ||_n|ii |i ƒ|_ |i i ƒ|_|iS(soRun Tests. Returns true on success, false on failure, and sets self.success to the same value. tstreamt verbosityRRN(t testRunnerR tnosetcoretTextTestRunnerRRRR‘tpluginstprepareTestRunnertrunRGtresultt wasSuccessfultsuccess(Rt plug_runner((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pytrunTests s   (RRR(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyRs(#RaRR“t nose.pluginsRRZtnose.plugins.errorclassRRtnose.plugins.baseRt nose.utilRRRdt nosetesterRR RtR RRER1R9R8tget_printoptionsRqRvRIt ExceptionR|R}R”t TestProgramR(((s?/usr/lib64/python2.6/site-packages/numpy/testing/noseclasses.pyts(      Z P