%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/unittest/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/unittest/case.pyc


Pac@s_dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
mZmZmZeZdZdefdYZd	efd
YZdefdYZd
ZdZdZdZdZdefdYZdefdYZdefdYZ dS(sTest case implementationiNi(tresult(tstrclasst	safe_reprtunorderable_list_differencet_count_diff_all_purposet_count_diff_hashables@
Diff is %s characters long. Set self.maxDiff to None to see it.tSkipTestcBseZdZRS(s
    Raise this exception in a test to skip it.

    Usually you can use TestCase.skipTest() or one of the skipping decorators
    instead of raising this directly.
    (t__name__t
__module__t__doc__(((s)/usr/local/lib/python2.7/unittest/case.pyRst_ExpectedFailurecBseZdZdZRS(s\
    Raise this when a test is expected to fail.

    This is an implementation detail.
    cCs tt|j||_dS(N(tsuperR
t__init__texc_info(tselfR
((s)/usr/local/lib/python2.7/unittest/case.pyR)s(RRR	R(((s)/usr/local/lib/python2.7/unittest/case.pyR
"st_UnexpectedSuccesscBseZdZRS(s7
    The test was supposed to fail, but it didn't!
    (RRR	(((s)/usr/local/lib/python2.7/unittest/case.pyR-scCs|S(N((tobj((s)/usr/local/lib/python2.7/unittest/case.pyt_id3scsfd}|S(s&
    Unconditionally skip a test.
    csUt|ttjfs?tj|fd}|}nt|_|_|S(NcstdS(N(R(targstkwargs(treason(s)/usr/local/lib/python2.7/unittest/case.pytskip_wrapper<s(	t
isinstancettypettypest	ClassTypet	functoolstwrapstTruet__unittest_skip__t__unittest_skip_why__(t	test_itemR(R(s)/usr/local/lib/python2.7/unittest/case.pyt	decorator:s			((RR ((Rs)/usr/local/lib/python2.7/unittest/case.pytskip6s
cCs|rt|StS(s/
    Skip a test if the condition is true.
    (R!R(t	conditionR((s)/usr/local/lib/python2.7/unittest/case.pytskipIfFs
cCs|st|StS(s3
    Skip a test unless the condition is true.
    (R!R(R"R((s)/usr/local/lib/python2.7/unittest/case.pyt
skipUnlessNs
cs"tjfd}|S(NcsAy||Wn#tk
r6ttjnXtdS(N(t	ExceptionR
tsysR
R(RR(tfunc(s)/usr/local/lib/python2.7/unittest/case.pytwrapperXs

(RR(R'R(((R's)/usr/local/lib/python2.7/unittest/case.pytexpectedFailureWst_AssertRaisesContextcBs,eZdZddZdZdZRS(sCA context manager used to implement TestCase.assertRaises* methods.cCs"||_|j|_||_dS(N(texpectedtfailureExceptiontexpected_regexp(RR+t	test_caseR-((s)/usr/local/lib/python2.7/unittest/case.pyRes	cCs|S(N((R((s)/usr/local/lib/python2.7/unittest/case.pyt	__enter__jscCs|dkrZy|jj}Wn tk
r>t|j}nX|jdj|nt||jsptS||_	|j
dkrtS|j
}|jt|s|jd|j
t|fntS(Ns{0} not raiseds"%s" does not match "%s"(tNoneR+RtAttributeErrortstrR,tformatt
issubclasstFalset	exceptionR-Rtsearchtpattern(Rtexc_typet	exc_valuettbtexc_nameR-((s)/usr/local/lib/python2.7/unittest/case.pyt__exit__ms"
			N(RRR	R0RR/R=(((s)/usr/local/lib/python2.7/unittest/case.pyR*bs	tTestCasecBs)eZdZeZeZd@ZdAZeZ	ddZ
dZdZd	Z
d
ZedZedZd
ZdZdZdZdZdZdZdZdZdZdBdZdZdZdZ dZ!dBdZ"dBdZ#dBdZ$dZ%dBd Z&d!Z'dBd"Z(dBd#Z)dBd$Z*dBdBdBd%Z+dBdBdBd&Z,e)Z-e*Z.e+Z/e,Z0e$Z1d'Z2e2e)Z3e2e*Z4e2e+Z5e2e,Z6e2e$Z7e2e&Z8e2e#Z9dBdBd(Z:d)Z;dBd*Z<dBd+Z=dBd,Z>dBd-Z?dBd.Z@dBd/ZAdBd0ZBdBd1ZCdBd2ZDdBd3ZEdBd4ZFdBd5ZGdBd6ZHdBd7ZIdBd8ZJdBd9ZKdBd:ZLdBd;ZMdBd<ZNdBd=ZOdBd>ZPdBd?ZQRS(CsWA class whose instances are single test cases.

    By default, the test code itself should be placed in a method named
    'runTest'.

    If the fixture may be used for many test cases, create as
    many test methods as are needed. When instantiating such a TestCase
    subclass, specify in the constructor arguments the name of the test method
    that the instance is to execute.

    Test authors should subclass TestCase for their own tests. Construction
    and deconstruction of the test's environment ('fixture') can be
    implemented by overriding the 'setUp' and 'tearDown' methods respectively.

    If it is necessary to override the __init__ method, the base class
    __init__ method must always be called. It is important that subclasses
    should not change the signature of their __init__ method, since instances
    of the classes are instantiated automatically by parts of the framework
    in order to be run.

    When subclassing TestCase, you can set these attributes:
    * failureException: determines which exception will be raised when
        the instance's assertion methods fail; test methods raising this
        exception will be deemed to have 'failed' rather than 'errored'.
    * longMessage: determines whether long messages (including repr of
        objects used in assert methods) will be printed on failure in *addition*
        to any explicit message passed.
    * maxDiff: sets the maximum length of a diff in failure messages
        by assert methods using difflib. It is looked up as an instance
        attribute so can be configured by individual tests if required.
    iPiiitrunTestcCs||_d|_yt||}Wn*tk
rQtd|j|fnX|j|_g|_	i|_
|jtd|jt
d|jtd|jtd|jtdy|jtdWntk
rnXdS(sCreate an instance of the class that will use the named test
           method when executed. Raises a ValueError if the instance does
           not have a method with the specified name.
        sno such test method in %s: %stassertDictEqualtassertListEqualtassertTupleEqualtassertSetEqualtassertMultiLineEqualN(t_testMethodNameR0t_resultForDoCleanupstgetattrR1t
ValueErrort	__class__R	t_testMethodDoct	_cleanupst_type_equality_funcstaddTypeEqualityFunctdicttlistttupletsett	frozensettunicodet	NameError(Rt
methodNamet
testMethod((s)/usr/local/lib/python2.7/unittest/case.pyRs&		
		
cCs||j|<dS(s[Add a type specific assertEqual style function to compare a type.

        This method is for use by TestCase subclasses that need to register
        their own type equality functions to provide nicer error messages.

        Args:
            typeobj: The data type to call this function on when both values
                    are of the same type in assertEqual().
            function: The callable taking two arguments and an optional
                    msg= argument that raises self.failureException with a
                    useful error message when the two arguments are not equal.
        N(RL(Rttypeobjtfunction((s)/usr/local/lib/python2.7/unittest/case.pyRMs
cOs|jj|||fdS(sAdd a function, with arguments, to be called when the test is
        completed. Functions added are called on a LIFO basis and are
        called after tearDown on test failure or success.

        Cleanup items are called even if setUp fails (unlike tearDown).N(RKtappend(RRXRR((s)/usr/local/lib/python2.7/unittest/case.pyt
addCleanupscCsdS(sAHook method for setting up the test fixture before exercising it.N((R((s)/usr/local/lib/python2.7/unittest/case.pytsetUpscCsdS(sAHook method for deconstructing the test fixture after testing it.N((R((s)/usr/local/lib/python2.7/unittest/case.pyttearDownscCsdS(sKHook method for setting up class fixture before running tests in the class.N((tcls((s)/usr/local/lib/python2.7/unittest/case.pyt
setUpClasstcCsdS(sVHook method for deconstructing the class fixture after running all tests in the class.N((R]((s)/usr/local/lib/python2.7/unittest/case.pyt
tearDownClassR_cCsdS(Ni((R((s)/usr/local/lib/python2.7/unittest/case.pytcountTestCasesscCs
tjS(N(Rt
TestResult(R((s)/usr/local/lib/python2.7/unittest/case.pytdefaultTestResultscCs,|j}|r(|jddjp+dS(sReturns a one-line description of the test, or None if no
        description has been provided.

        The default implementation of this method returns the first line of
        the specified test method's docstring.
        s
iN(RJtsplittstripR0(Rtdoc((s)/usr/local/lib/python2.7/unittest/case.pytshortDescriptions	cCsdt|j|jfS(Ns%s.%s(RRIRE(R((s)/usr/local/lib/python2.7/unittest/case.pytidscCs,t|t|k	rtS|j|jkS(N(RtNotImplementedRE(Rtother((s)/usr/local/lib/python2.7/unittest/case.pyt__eq__scCs||kS(N((RRj((s)/usr/local/lib/python2.7/unittest/case.pyt__ne__scCstt||jfS(N(thashRRE(R((s)/usr/local/lib/python2.7/unittest/case.pyt__hash__scCsd|jt|jfS(Ns%s (%s)(RERRI(R((s)/usr/local/lib/python2.7/unittest/case.pyt__str__scCsdt|j|jfS(Ns<%s testMethod=%s>(RRIRE(R((s)/usr/local/lib/python2.7/unittest/case.pyt__repr__scCsRt|dd}|dk	r.|||n tjdtd|j|dS(NtaddSkips4TestResult has no addSkip method, skips not reportedi(RGR0twarningstwarntRuntimeWarningt
addSuccess(RRRRq((s)/usr/local/lib/python2.7/unittest/case.pyt_addSkips	
cCsr|}|dkrI|j}t|dd}|dk	rI|qIn||_|j|t||j}t|jdtst|dtrz;t|jddpt|dd}|j||Wd|j	|XdSz>t}y|j
WnXtk
r*}|j|t|nt
k
r=n|j|tjnXy|WnBt
k
r{n5|jk
r|j|tjntk
r}t|dd}|dk	r|||jqtjdt|j|ntk
ret|dd}	|	dk	r<|	|qtjdt|j|tjnKtk
r}|j|t|n#|j|tjnXt}y|jWn6t
k
rn#|j|tjt}nX|j}
|o|
}|r%|j|nWd|j	||dkrmt|d	d}|dk	rm|qmnXdS(
NtstartTestRunRRR_taddExpectedFailures@TestResult has no addExpectedFailure method, reporting as passestaddUnexpectedSuccesssDTestResult has no addUnexpectedSuccess method, reporting as failureststopTestRun(R0RcRGRFt	startTestRERIR5RvtstopTestR[RR2tKeyboardInterrupttaddErrorR&R
R,t
addFailureR
RrRsRtRuRRR\t
doCleanups(RRtorig_resultRwRVtskip_whytsuccessteRxRytcleanUpSuccessRz((s)/usr/local/lib/python2.7/unittest/case.pytrun's
	


	

	


cCs|j}t}xr|jr|jjd\}}}y|||Wqtk
r]qt}|j|tjqXqW|S(sNExecute all cleanup functions. Normally called for you after
        tearDown.i(	RFRRKtpopR}R5R~R&R
(RRtokRXRR((s)/usr/local/lib/python2.7/unittest/case.pyRxs	
cOs|j||S(N(R(RRtkwds((s)/usr/local/lib/python2.7/unittest/case.pyt__call__scCsc|jt||j|jx5|jr^|jjd\}}}|||q*WdS(s6Run the test without collecting errors in a TestResultiN(R[RGRER\RKR(RRXRR((s)/usr/local/lib/python2.7/unittest/case.pytdebugs

cCst|dS(sSkip this test.N(R(RR((s)/usr/local/lib/python2.7/unittest/case.pytskipTestscCs|j|dS(s)Fail immediately, with the given message.N(R,(Rtmsg((s)/usr/local/lib/python2.7/unittest/case.pytfailscCs8|r4|j|dt|}|j|ndS(s#Check that the expression is false.s%s is not falseN(t_formatMessageRR,(RtexprR((s)/usr/local/lib/python2.7/unittest/case.pytassertFalsescCs8|s4|j|dt|}|j|ndS(s"Check that the expression is true.s%s is not trueN(RRR,(RRR((s)/usr/local/lib/python2.7/unittest/case.pyt
assertTruescCsd|js|p|S|dkr#|Syd||fSWn(tk
r_dt|t|fSXdS(sHonour the longMessage attribute when generating failure messages.
        If longMessage is False this means:
        * Use only an explicit message if it is provided
        * Otherwise use the standard message for the assert

        If longMessage is True:
        * Use the standard message
        * If an explicit message is provided, plus ' : ' and the explicit message
        s%s : %sN(tlongMessageR0tUnicodeDecodeErrorR(RRtstandardMsg((s)/usr/local/lib/python2.7/unittest/case.pyRs
	

cOs=t||}|dkr|S||||WdQXdS(sFail unless an exception of class excClass is raised
           by callableObj when invoked with arguments args and keyword
           arguments kwargs. If a different type of exception is
           raised, it will not be caught, and the test case will be
           deemed to have suffered an error, exactly as for an
           unexpected exception.

           If called with callableObj omitted or None, will return a
           context object used like this::

                with self.assertRaises(SomeException):
                    do_something()

           The context manager keeps a reference to the exception as
           the 'exception' attribute. This allows you to inspect the
           exception after the assertion::

               with self.assertRaises(SomeException) as cm:
                   do_something()
               the_exception = cm.exception
               self.assertEqual(the_exception.error_code, 3)
        N(R*R0(RtexcClasstcallableObjRRtcontext((s)/usr/local/lib/python2.7/unittest/case.pytassertRaisess
cCskt|t|krd|jjt|}|dk	rdt|tr]t||}n|Sn|jS(sGet a detailed comparison function for the types of the two args.

        Returns: A callable accepting (first, second, msg=None) that will
        raise a failure exception if first != second with a useful human
        readable error message for those types.
        N(RRLtgetR0Rt
basestringRGt_baseAssertEqual(Rtfirsttsecondtasserter((s)/usr/local/lib/python2.7/unittest/case.pyt_getAssertEqualityFuncscCsP||ksLdt|t|f}|j||}|j|ndS(s:The default assertEqual implementation, not type specific.s%s != %sN(RRR,(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pyRscCs)|j||}|||d|dS(s[Fail if the two objects are unequal as determined by the '=='
           operator.
        RN(R(RRRRtassertion_func((s)/usr/local/lib/python2.7/unittest/case.pytassertEqualscCsJ||ksF|j|dt|t|f}|j|ndS(sYFail if the two objects are equal as determined by the '!='
           operator.
        s%s == %sN(RRR,(RRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertNotEqualscCs||krdS|dk	r7|dk	r7tdn|dk	rt|||kr]dSdt|t|t|f}nW|dkrd}ntt|||dkrdSdt|t||f}|j||}|j|dS(s'Fail if the two objects are unequal as determined by their
           difference rounded to the given number of decimal places
           (default 7) and comparing to zero, or by comparing that the
           difference between the two objects is more than the given
           delta.

           Note that decimal places (from zero) are usually not the same
           as significant digits (measured from the most significant digit).

           If the two objects compare equal then they will automatically
           compare almost equal.
        Ns specify delta or places not boths%s != %s within %s deltaiis%s != %s within %r places(R0t	TypeErrortabsRtroundRR,(RRRtplacesRtdeltaR((s)/usr/local/lib/python2.7/unittest/case.pytassertAlmostEqual
s&
			
cCs|dk	r'|dk	r'tdn|dk	r||krZt|||krZdSdt|t|t|f}nd|dkrd}n||krtt|||dkrdSdt|t||f}|j||}|j|dS(sFail if the two objects are equal as determined by their
           difference rounded to the given number of decimal places
           (default 7) and comparing to zero, or by comparing that the
           difference between the two objects is less than the given delta.

           Note that decimal places (from zero) are usually not the same
           as significant digits (measured from the most significant digit).

           Objects that are equal automatically fail.
        s specify delta or places not bothNs%s == %s within %s deltaiis%s == %s within %r places(R0RRRRRR,(RRRRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertNotAlmostEqual4s"#		,	
csfd}|S(Ncs,tjdjjtd||S(NsPlease use {0} instead.i(RrRsR3RtPendingDeprecationWarning(RR(t
original_func(s)/usr/local/lib/python2.7/unittest/case.pytdeprecated_funcas
((RR((Rs)/usr/local/lib/python2.7/unittest/case.pyt
_deprecate`scCs|dk	rz|j}t||sF|jd|t|fnt||s|jd|t|fqnd}d}yt|}Wn!ttfk
rd|}nX|dkryt|}Wqttfk
rd|}qXn|dkr||krdSt|}	t|}
t|	dkrT|	d d}	nt|
dkrw|
d d}
n|j|	|
f}d	|}xt	t
||D]}y||}
Wn/tttfk
r|d
||f7}PnXy||}Wn/tttfk
r1|d||f7}PnX|
|kr|d|t|
t|f7}PqqW||kr|dkrt|t|krdS||kr|d
|||f7}y"|d|t||f7}Wqtttfk
r|d||f7}qXq||kr|d|||f7}y"|d|t||f7}Wqtttfk
r|d||f7}qXqn|}ddj
tjtj|jtj|j}|j||}|j||}|j|dS(sAAn equality assertion for ordered sequences (like lists and tuples).

        For the purposes of this function, a valid ordered sequence type is one
        which can be indexed, has a length, and has an equality operator.

        Args:
            seq1: The first sequence to compare.
            seq2: The second sequence to compare.
            seq_type: The expected datatype of the sequences, or None if no
                    datatype should be enforced.
            msg: Optional message to use on failure instead of a list of
                    differences.
        sFirst sequence is not a %s: %ssSecond sequence is not a %s: %stsequences(First %s has no length.    Non-sequence?s)Second %s has no length.    Non-sequence?Nis...s%ss differ: %s != %s
s(
Unable to index element %d of first %s
s)
Unable to index element %d of second %s
s#
First differing element %d:
%s
%s
s+
First %s contains %d additional elements.
sFirst extra element %d:
%s
s'Unable to index element %d of first %s
s,
Second %s contains %d additional elements.
s(Unable to index element %d of second %s
s
(R0RRR,RtlenRtNotImplementedErrort
capitalizetxrangetmint
IndexErrorRtjointdifflibtndifftpprinttpformatt
splitlinest_truncateMessageRR(Rtseq1tseq2Rtseq_typet
seq_type_namet	differingtlen1tlen2t	seq1_reprt	seq2_reprtelementstititem1titem2RtdiffMsg((s)/usr/local/lib/python2.7/unittest/case.pytassertSequenceEqualps			
	cCsA|j}|dks't||kr/||S|tt|S(N(tmaxDiffR0RtDIFF_OMITTED(Rtmessagetdifftmax_diff((s)/usr/local/lib/python2.7/unittest/case.pyRs	cCs|j|||dtdS(sA list-specific equality assertion.

        Args:
            list1: The first list to compare.
            list2: The second list to compare.
            msg: Optional message to use on failure instead of a list of
                    differences.

        RN(RRO(Rtlist1tlist2R((s)/usr/local/lib/python2.7/unittest/case.pyRAs
cCs|j|||dtdS(sA tuple-specific equality assertion.

        Args:
            tuple1: The first tuple to compare.
            tuple2: The second tuple to compare.
            msg: Optional message to use on failure instead of a list of
                    differences.
        RN(RRP(Rttuple1ttuple2R((s)/usr/local/lib/python2.7/unittest/case.pyRBs	c
Cspy|j|}WnGtk
r9}|jd|n$tk
r\}|jd|nXy|j|}WnGtk
r}|jd|n$tk
r}|jd|nX|p|sdSg}|r
|jdx$|D]}|jt|qWn|rD|jdx$|D]}|jt|q$Wndj|}	|j|j||	dS(sA set-specific equality assertion.

        Args:
            set1: The first set to compare.
            set2: The second set to compare.
            msg: Optional message to use on failure instead of a list of
                    differences.

        assertSetEqual uses ducktyping to support different types of sets, and
        is optimized for sets specifically (parameters must support a
        difference method).
        s/invalid type when attempting set difference: %ss2first argument does not support set difference: %ss3second argument does not support set difference: %sNs*Items in the first set but not the second:s*Items in the second set but not the first:s
(t
differenceRRR1RYtreprRR(
Rtset1tset2Rtdifference1Rtdifference2tlinestitemR((s)/usr/local/lib/python2.7/unittest/case.pyRCs2




cCsH||krDdt|t|f}|j|j||ndS(sDJust like self.assertTrue(a in b), but with a nicer default message.s%s not found in %sN(RRR(Rtmembert	containerRR((s)/usr/local/lib/python2.7/unittest/case.pytassertInscCsH||krDdt|t|f}|j|j||ndS(sHJust like self.assertTrue(a not in b), but with a nicer default message.s%s unexpectedly found in %sN(RRR(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertNotIn&scCsH||k	rDdt|t|f}|j|j||ndS(sDJust like self.assertTrue(a is b), but with a nicer default message.s%s is not %sN(RRR(Rtexpr1texpr2RR((s)/usr/local/lib/python2.7/unittest/case.pytassertIs-scCs?||kr;dt|f}|j|j||ndS(sHJust like self.assertTrue(a is not b), but with a nicer default message.sunexpectedly identical: %sN(RRR(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertIsNot4scCs|j|td|j|td||krdt|tt|tf}ddjtjtj|j	tj|j	}|j
||}|j|j||ndS(Ns"First argument is not a dictionarys#Second argument is not a dictionarys%s != %ss
(
tassertIsInstanceRNRRRRRRRRRRR(Rtd1td2RRR((s)/usr/local/lib/python2.7/unittest/case.pyR@:s"c	Csg}g}xy|jD]k\}}||krA|j|q|||kr|jdt|t|t||fqqW|p|sdSd}|rddjd|D}n|r|r|d7}n|ddj|7}n|j|j||dS(	s0Checks whether actual is a superset of expected.s%s, expected: %s, actual: %sNR_sMissing: %st,css|]}t|VqdS(N(R(t.0tm((s)/usr/local/lib/python2.7/unittest/case.pys	<genexpr>Wss; sMismatched values: %s(t	iteritemsRYRRRR(	RR+tactualRtmissingt
mismatchedtkeytvalueR((s)/usr/local/lib/python2.7/unittest/case.pytassertDictContainsSubsetFs(	
c	Cs9t|t|}}tjtjr_x-dddgD]}tjd|tq?Wny"tj|}tj|}Wn t	k
rt
||}	n X||krdSt||}	WdQX|	r5d}
g|	D]}d|^q}dj|}
|j
|
|
}
|j||
}|j|ndS(	sAn unordered sequence specific comparison. It asserts that
        actual_seq and expected_seq have the same element counts.
        Equivalent to::

            self.assertEqual(Counter(iter(actual_seq)),
                             Counter(iter(expected_seq)))

        Asserts that each element has the same count in both sequences.
        Example:
            - [0, 1, 1] and [1, 0, 1] compare equal.
            - [0, 0, 1] and [0, 1] compare unequal.
        s'(code|dict|type) inequality comparisonss,builtin_function_or_method order comparisonsscomparing unequal typestignoreNsElement counts were not equal:
s First has %d, Second has %d:  %rs
(RORrtcatch_warningsR&tpy3kwarningtfilterwarningstDeprecationWarningtcollectionstCounterRRRRRRR(Rtexpected_seqt
actual_seqRt	first_seqt
second_seqt_msgRRtdifferencesRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertItemsEqual`s,

	

cCsG|j|td|j|td||krCt||jks\t||jkrr|j|||n|jt}|jt}t|dkr|jd|kr|dg}|dg}ndt|tt|tf}ddj	t
j||}|j||}|j
|j||ndS(	s-Assert that two multi-line strings are equal.sFirst argument is not a stringsSecond argument is not a stringis
s
s%s != %sR_N(RRRt_diffThresholdRRRReRRRRRRR(RRRRt
firstlinestsecondlinesRR((s)/usr/local/lib/python2.7/unittest/case.pyRDs$'
cCsH||ksDdt|t|f}|j|j||ndS(sCJust like self.assertTrue(a < b), but with a nicer default message.s%s not less than %sN(RRR(RtatbRR((s)/usr/local/lib/python2.7/unittest/case.pyt
assertLessscCsH||ksDdt|t|f}|j|j||ndS(sDJust like self.assertTrue(a <= b), but with a nicer default message.s%s not less than or equal to %sN(RRR(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertLessEqualscCsH||ksDdt|t|f}|j|j||ndS(sCJust like self.assertTrue(a > b), but with a nicer default message.s%s not greater than %sN(RRR(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pyt
assertGreaterscCsH||ksDdt|t|f}|j|j||ndS(sDJust like self.assertTrue(a >= b), but with a nicer default message.s"%s not greater than or equal to %sN(RRR(RRRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertGreaterEqualscCs?|dk	r;dt|f}|j|j||ndS(sCSame as self.assertTrue(obj is None), with a nicer default message.s%s is not NoneN(R0RRR(RRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertIsNonescCs2|dkr.d}|j|j||ndS(s(Included for symmetry with assertIsNone.sunexpectedly NoneN(R0RR(RRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertIsNotNonescCsEt||sAdt||f}|j|j||ndS(sTSame as self.assertTrue(isinstance(obj, cls)), with a nicer
        default message.s%s is not an instance of %rN(RRRR(RRR]RR((s)/usr/local/lib/python2.7/unittest/case.pyRscCsEt||rAdt||f}|j|j||ndS(s,Included for symmetry with assertIsInstance.s%s is an instance of %rN(RRRR(RRR]RR((s)/usr/local/lib/python2.7/unittest/case.pytassertNotIsInstancescOs^|dk	rtj|}nt|||}|dkr@|S||||WdQXdS(sAsserts that the message in a raised exception matches a regexp.

        Args:
            expected_exception: Exception class expected to be raised.
            expected_regexp: Regexp (re pattern object or string) expected
                    to be found in error message.
            callable_obj: Function to be called.
            args: Extra args.
            kwargs: Extra kwargs.
        N(R0tretcompileR*(Rtexpected_exceptionR-tcallable_objRRR((s)/usr/local/lib/python2.7/unittest/case.pytassertRaisesRegexpscCsht|tr!tj|}n|j|sd|p9d}d||j|f}|j|ndS(s=Fail the test unless the text matches the regular expression.sRegexp didn't matchs%s: %r not found in %rN(RRRR
R7R8R,(RttextR-R((s)/usr/local/lib/python2.7/unittest/case.pytassertRegexpMatchesscCst|tr!tj|}n|j|}|r|p?d}d|||j|j!|j|f}|j|ndS(s9Fail the test if the text matches the regular expression.sRegexp matcheds%s: %r matches %r in %rN(	RRRR
R7tstarttendR8R,(RRtunexpected_regexpRtmatch((s)/usr/local/lib/python2.7/unittest/case.pytassertNotRegexpMatchess
iiN(RRRR	tAssertionErrorR,R5RRRt_classSetupFailedRRMRZR[R\tclassmethodR^R`RaRcRgRhRkRlRnRoRpRvR0RRRRRRRRRRRRRRRRtassertEqualstassertNotEqualstassertAlmostEqualstassertNotAlmostEqualstassert_RtfailUnlessEqualtfailIfEqualtfailUnlessAlmostEqualtfailIfAlmostEqualt
failUnlesstfailUnlessRaisestfailIfRRRARBRCRRRRR@RRRDRRRRR	R
RRRRR(((s)/usr/local/lib/python2.7/unittest/case.pyR>s															Q							
'$	g	+(	tFunctionTestCasecBszeZdZddddZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZRS(
sIA test case that wraps a test function.

    This is useful for slipping pre-existing test functions into the
    unittest framework. Optionally, set-up and tidy-up functions can be
    supplied. As with TestCase, the tidy-up ('tearDown') function will
    always be called if the set-up ('setUp') function ran successfully.
    cCs;tt|j||_||_||_||_dS(N(RR'Rt
_setUpFunct
_tearDownFunct	_testFunct_description(RttestFuncR[R\tdescription((s)/usr/local/lib/python2.7/unittest/case.pyRs
			cCs |jdk	r|jndS(N(R(R0(R((s)/usr/local/lib/python2.7/unittest/case.pyR[scCs |jdk	r|jndS(N(R)R0(R((s)/usr/local/lib/python2.7/unittest/case.pyR\scCs|jdS(N(R*(R((s)/usr/local/lib/python2.7/unittest/case.pyR?scCs
|jjS(N(R*R(R((s)/usr/local/lib/python2.7/unittest/case.pyRhscCs\t||jstS|j|jko[|j|jko[|j|jko[|j|jkS(N(RRIRiR(R)R*R+(RRj((s)/usr/local/lib/python2.7/unittest/case.pyRkscCs||kS(N((RRj((s)/usr/local/lib/python2.7/unittest/case.pyRl"scCs+tt||j|j|j|jfS(N(RmRR(R)R*R+(R((s)/usr/local/lib/python2.7/unittest/case.pyRn%scCsdt|j|jjfS(Ns%s (%s)(RRIR*R(R((s)/usr/local/lib/python2.7/unittest/case.pyRo)scCsdt|j|jfS(Ns<%s tec=%s>(RRIR*(R((s)/usr/local/lib/python2.7/unittest/case.pyRp-scCsE|jdk	r|jS|jj}|rA|jddjpDdS(Ns
i(R+R0R*R	RdRe(RRf((s)/usr/local/lib/python2.7/unittest/case.pyRg1sN(RRR	R0RR[R\R?RhRkRlRnRoRpRg(((s)/usr/local/lib/python2.7/unittest/case.pyR's										(!R	RR&RRRRRRrR_RtutilRRRRRRt
__unittestRR%RR
RRR!R#R$R)tobjectR*R>R'(((s)/usr/local/lib/python2.7/unittest/case.pyt<module>s4(							!{

Zerion Mini Shell 1.0