%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyc

�
�9Zc@`s�ddlmZmZmZddlZddlZddlZddlZddlm	Z
ddlmZm
Z
ddlmZddlmZddlZddlmZdd	lmZmZd
ejfd��YZdejfd
��YZde
jfd��YZej�Zde
j fd��YZ!de"fd��YZ#de
fd��YZ$e$Z%dej&j'fd��YZ(dS(i(tdivisiontabsolute_importtprint_functionN(tdoctests(t
ErrorClasstErrorClassPlugin(tPlugin(tsrci(tget_package_name(tKnownFailureExceptiontKnownFailureTesttNumpyDocTestFindercB`seZd�Zd�ZRS(cC`s�|dkrtStj|�r/|j|jkStj|�rN|j|jkStj	|�rm|j|jkStj
|�r�|j|jjjkStj
|�dk	r�|tj
|�kSt|d�r�|j|jkSt|t�r�tStd��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__globals__t	isbuiltint__name__Rtisclasstismethodt__self__t	__class__t	getmodulethasattrt
isinstancetpropertyt
ValueError(tselftmoduletobject((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyt_from_modules"c	C`s�tjj||||||||�ddlm}m}	m}
m}m}|
|�r�|j	r�x||j
j�D]h\}
}d||
f}||�s�|	|�rr|j||�rr|j|||||||�qrqrWn|	|�r�|j	r�x�|j
j�D]�\}
}t
|t�r3t||
�}nt
|t�rWt||
�j}n||�s�|	|�s�||�s�t
|t�r|j||�rd||
f}
|j|||
||||�qqWndS(sm
        Find tests for the given object and any contained objects, and
        add them to `tests`.
        i(t	isroutineRtismoduleRRs%s.%sN(tdoctestt
DocTestFindert_findRR"RR#RRt_recurseRtitemsR!Rtstaticmethodtgetattrtclassmethodt__func__R(RtteststobjtnameRtsource_linestglobstseenR"RR#RRtvalnametvaltvalname1((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR&;s,
((RRR!R&(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRs	tNumpyOutputCheckercB`seZd�ZRS(cC`s�tjj||||�}|s�d|kr1tS|jdd�}|jdd�}x@ddgD]2}|jd|d�}|jd|d�}qbWtjj||||�}n|S(Ns#randoms'>s'<iis'<i%d'tint(R$t
OutputCheckertcheck_outputRtreplace(Rtwanttgottoptionflagstrettsz((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR9ms	(RRR9(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR6lstNumpyDocTestCasecB`s#eZddddddd�ZRS(it_cC`sA||_||_tjj||d|d|d|d|�dS(NR=tsetUpttearDowntchecker(t_result_vart	_nose_objR$tDocTestCaset__init__(RttestR=RBRCRDR.t
result_var((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRH�s		N(RRR
RH(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR@�s	tNumpyDoctestcB`s~eZdZdZejejBZddgZe	Z
eZe
Zejd�Zd�Zd�Zd�Zd�Zd	�ZRS(
tnumpydoctesti�sgenerate_numpy_api.pyssetup.pycC`s)tj|||�t|_d|_dS(N(RtoptionsRt
doctest_testsR
tdoctest_result_var(Rtparsertenv((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRM�s	cC`sutj|||�|j�|_tj�|_|jrqg|jjD]}|j	dkrG|^qG|j_ndS(NR$(
Rt	configurettest_finder_classtfinderR$t
DocTestParserRPtenabledtpluginsR/(RRMtconfigtp((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRR�s	cC`s�ttjj|j��}itd6dd6dd6td6|_d|kr�|jd�}|d}t	||ji|g�|j|<nd	S(
s` Configure `test` object to set test context

        We set the numpy / scipy standard doctest namespace

        Parameters
        ----------
        test : test object
            with ``globs`` dictionary defining namespace

        Returns
        -------
        None

        Notes
        -----
        `test` object modified in place
        t__builtins__t__main__t__file__Rtnptscipyt.i����N(
RtostpathtdirnametfilenameRZtnumpyR1tsplitt
__import__(RRItpkg_nameRYtp2((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pytset_test_context�s



c	c`s�|j|j�s)tjjd|�dSy|jj|�}Wntk
rSdSX|s^dS|j�t	|j
�}xk|D]c}|js�q~n|js�||_n|j
|�|j|d|jd|j�d|j�Vq~WdS(NsDoctest doesn't want module %sR=RDRJ(tmatchesRtnpdtlogtdebugRTtfindtAttributeErrortsortRR\texamplesRcRitdoctest_case_classtdoctest_optflagstout_check_classRO(RRR-tmodule_fileRI((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pytloadTestsFromModule�s*


		
	cC`stjt�dS(N(Rdtset_printoptionstprint_state(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pytafterContextscC`s8tjj|�}||jkr%tStjj||�S(N(R`Ratbasenametdoctest_ignoretFalseRktDoctesttwantFile(Rtfiletbn((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR~s(RRR/tscoreR$tNORMALIZE_WHITESPACEtELLIPSISRsR{R@RrR6RtRRSR`tenvironRMRRRiRvRyR~(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRK�s			
	*		t	UnpluggercB`s>eZdZdZeZdZdd�Zd�Zd�Z	RS(si Nose plugin to remove named plugin late in loading

    By default it removes the "doctest" plugin.
    t	unpluggeri�R$cC`s
||_dS(N(t	to_unplug(RR�((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRHscC`sdS(N((RRPRQ((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRMscC`s;g|jjD]}|j|jkr
|^q
|j_dS(N(RWR/R�(RRMRXRY((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRRs(
RRt__doc__R/RRVR�RHRMRR(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR�s	tKnownFailurePlugincB`sDeZdZeZeeddde�Ze	j
d�Zd�ZRS(s1Plugin that installs a KNOWNFAIL error class for the
    KnownFailureClass exception.  When KnownFailure 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
C`s;d}|jdddddd|j|t�dd	�dS(
NtNOSE_WITHOUT_KNOWNFAILs--no-knownfailtactiont
store_truetdesttnoKnownFailtdefaultthelps3Disable special handling of KnownFailure exceptions(t
add_optiontgetR|(RRPRQtenv_opt((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRM.scC`s>|js
dS||_t|dt�}|r:t|_ndS(NR�(t
can_configuretconfR*R|RV(RRMR�tdisable((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyRR5s		(
RRR�RRVRR	R|t	knownfailR`R�RMRR(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR�#s		tNumpyTestProgramcB`seZd�ZRS(cC`s�|jdkrEtjjd|jjd|jjd|j�|_n|jjj	|j�}|dk	ru||_n|jj
|j�|_|jj
�|_|jS(sRun Tests. Returns true on success, false on failure, and
        sets self.success to the same value.

        Because nose currently discards the test result object, but we need
        to return it to the user, override TestProgram.runTests to retain
        the result
        tstreamt	verbosityRXN(t
testRunnerR
tnosetcoretTextTestRunnerRXR�R�RWtprepareTestRunnertrunRItresultt
wasSuccessfultsuccess(Rtplug_runner((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pytrunTestsCs(RRR�(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyR�Bs()t
__future__RRRR`R$RR�tnose.pluginsRRktnose.plugins.errorclassRRtnose.plugins.baseRt	nose.utilRRdt
nosetesterRtutilsR	R
R%RR8R6RGR@tget_printoptionsRxR}RKR R�R�tKnownFailureR�tTestProgramR�(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/testing/noseclasses.pyt<module>s(	Ox

Zerion Mini Shell 1.0