b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/unittest.pyo
Size34.04 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:25
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
ñ� ]c@sìdZdZdZddd!ZddkZddkZddkZddkZddkZdd d
d d d
ddgZ e i
dddg�ei d d+jo
d�Z nd�Z
eZd�ZdZdd,d��YZd d-d��YZd
d.d��YZd
efd��YZd d/d��YZe�Zdd�Zed�Zdeed �Zdeed!�Zd"d0d#��YZd$efd%��YZd d1d&��YZ d'd2d(��YZ!e!Z"e#d)joe"d*d�ndS(3s�
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
Smalltalk testing framework.

This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
text-based utility class for running the tests and reporting the results
(TextTestRunner).

Simple usage:

import unittest

class IntegerArithmenticTestCase(unittest.TestCase):
def testAdd(self): ## test method names begin 'test*'
self.assertEquals((1 + 2), 3)
self.assertEquals(0 + 1, 1)
def testMultiply(self):
self.assertEquals((0 * 10), 0)
self.assertEquals((5 * 8), 40)

if __name__ == '__main__':
unittest.main()

Further information is available in the bundled documentation, and from

http://docs.python.org/lib/module-unittest.html

Copyright (c) 1999-2003 Steve Purcell
This module is free software, and you may redistribute it and/or modify
it under the same terms as Python itself, so long as this copyright message
and disclaimer are retained in their original form.

IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
s
Steve Purcells stephen_purcell at yahoo dot coms#Revision: 1.63 $i iþÿÿÿiÿÿÿÿNt
TestResulttTestCaset TestSuitetTextTestRunnert
TestLoadertFunctionTestCasetmaintdefaultTestLoadertgetTestCaseNamest makeSuitet
findTestCasesicCs�ddk}t|�ttfjoHx@|D]8}|tjo
ti}n|i||�odSq,WdS|i||�SdS(Niÿÿÿÿii(t __builtin__ttypettupletlistttypest ClassTypet
isinstance(tobjtclsinfoR tcls((s /usr/lib64/python2.6/unittest.pyRFs 

 cs dtf�fd��Y}|S(s,Convert a cmp= function into a key= functiontKcs eZd�Z�fd�ZRS(cSs
||_dS(N(R(tselfR((s /usr/lib64/python2.6/unittest.pyt__init__Sscs�|i|i�djS(Niÿÿÿÿ(R(Rtother(tmycmp(s /usr/lib64/python2.6/unittest.pyt__lt__Us(t__name__t
__module__RR((R(s /usr/lib64/python2.6/unittest.pyRRs (tobject(RR((Rs /usr/lib64/python2.6/unittest.pyt _CmpToKeyPscCsd|i|ifS(Ns%s.%s(RR(R((s /usr/lib64/python2.6/unittest.pyt _strclass`sicBszeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Z d
�Z d �Z
d �ZRS(
sÙHolder for test result information.

Test results are automatically managed by the TestCase and TestSuite
classes, and do not need to be explicitly manipulated by writers of tests.

Each instance holds the total number of tests run, and collections of
failures and errors that occurred among those test runs. The collections
contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
formatted traceback of the error that occurred.
cCs(g|_g|_d|_t|_dS(Ni(tfailuresterrorsttestsRuntFalset
shouldStop(R((s /usr/lib64/python2.6/unittest.pyRps   cCs|id|_dS(s-Called when the given test is about to be runiN(R"(Rttest((s /usr/lib64/python2.6/unittest.pyt startTestvscCsdS(s'Called when the given test has been runN((RR%((s /usr/lib64/python2.6/unittest.pytstopTestzscCs&|ii||i||�f�dS(smCalled when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().
N(R!tappendt_exc_info_to_string(RR%terr((s /usr/lib64/python2.6/unittest.pytaddError~scCs&|ii||i||�f�dS(sdCalled when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().N(R R(R)(RR%R*((s /usr/lib64/python2.6/unittest.pyt
addFailure�scCsdS(s-Called when a test has completed successfullyN((RR%((s /usr/lib64/python2.6/unittest.pyt
addSuccess�scCs+t|i�t|i�jodjSS(s.Tells whether or not this result was a successi(tlenR R!(R((s /usr/lib64/python2.6/unittest.pyt
wasSuccessful�scCs
t|_dS(s*Indicates that the tests should be abortedN(tTrueR$(R((s /usr/lib64/python2.6/unittest.pytstop�scCs�|\}}}x%|o|i|�o
|i}qW||ijo/|i|�}diti||||��Sditi|||��S(s>Converts a sys.exc_info()-style tuple of values into a string.t(t_is_relevant_tb_levelttb_nexttfailureExceptiont_count_relevant_tb_levelstjoint tracebacktformat_exception(RR*R%texctypetvaluettbtlength((s /usr/lib64/python2.6/unittest.pyR)�s cCsd|iijS(Nt
__unittest(ttb_framet f_globals(RR<((s /usr/lib64/python2.6/unittest.pyR3¡scCs=d}x0|o(|i|� o|d7}|i}q W|S(Nii(R3R4(RR<R=((s /usr/lib64/python2.6/unittest.pyR6¤s 
cCs2dt|i�|it|i�t|i�fS(Ns!<%s run=%i errors=%i failures=%i>(Rt __class__R"R.R!R (R((s /usr/lib64/python2.6/unittest.pyt__repr__«s(RRt__doc__RR&R'R+R,R-R/R1R)R3R6RB(((s /usr/lib64/python2.6/unittest.pyRes
          cBsKeZdZeZdd�Zd�Zd�Zd�Zd�Z d�Z
d�Z d �Z d
�Z
d �Zd �Zd
�Zdd�Zd�Zd�Zd�Zdd�Zdd�Zdd�Zd�Zdd�Zdd�Zddd�Zddd�ZeZZeZ Z!eZ"Z#eZ$Z%eZ&eZ'Z(eZ)RS(s«A 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.
trunTestcCsXy(||_t||�}|i|_Wn)tj
otd|i|f�nXdS(sÅCreate 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: %sN(t_testMethodNametgetattrRCt_testMethodDoctAttributeErrort
ValueErrorRA(Rt
methodNamet
testMethod((s /usr/lib64/python2.6/unittest.pyRÌs cCsdS(sAHook method for setting up the test fixture before exercising it.N((R((s /usr/lib64/python2.6/unittest.pytsetUpÙscCsdS(sAHook method for deconstructing the test fixture after testing it.N((R((s /usr/lib64/python2.6/unittest.pyttearDownÝscCsdS(Ni((R((s /usr/lib64/python2.6/unittest.pytcountTestCasesáscCst�S(N(R(R((s /usr/lib64/python2.6/unittest.pytdefaultTestResultäscCs.|i}|o|id�di�pdS(såReturns 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(RGtsplittstriptNone(Rtdoc((s /usr/lib64/python2.6/unittest.pytshortDescriptionçs cCsdt|i�|ifS(Ns%s.%s(RRARE(R((s /usr/lib64/python2.6/unittest.pytidñscCs.t|�t|�j otS|i|ijS(N(R R#RE(RR((s /usr/lib64/python2.6/unittest.pyt__eq__ôscCs ||j S(N((RR((s /usr/lib64/python2.6/unittest.pyt__ne__úscCstt|�|if�S(N(thashR RE(R((s /usr/lib64/python2.6/unittest.pyt__hash__ýscCsd|it|i�fS(Ns%s (%s)(RERRA(R((s /usr/lib64/python2.6/unittest.pyt__str__scCsdt|i�|ifS(Ns<%s testMethod=%s>(RRARE(R((s /usr/lib64/python2.6/unittest.pyRBscCsq|djo|i�}n|i|�t||i�}z y|i�Wn3tj
o
�n|i||i��dSXt }y|�t
}Wn]|i j
o|i ||i��n3tj
o
�n|i||i��nXy|i
�Wn8tj
o
�n$|i||i��t }nX|o|i|�nWd|i|�XdS(N(RRROR&RFRERLtKeyboardInterruptR+t _exc_infoR#R0R5R,RMR-R'(RtresultRKtok((s /usr/lib64/python2.6/unittest.pytruns@



cOs|i||�S(N(R_(Rtargstkwds((s /usr/lib64/python2.6/unittest.pyt__call__*scCs+|i�t||i��|i�dS(s6Run the test without collecting errors in a TestResultN(RLRFRERM(R((s /usr/lib64/python2.6/unittest.pytdebug-s
cCs
ti�S(s¡Return a version of sys.exc_info() with the traceback frame
minimised; usually the top level of the traceback frame is not
needed.
(tsystexc_info(R((s /usr/lib64/python2.6/unittest.pyR\3scCs|i|�dS(s)Fail immediately, with the given message.N(R5(Rtmsg((s /usr/lib64/python2.6/unittest.pytfail:scCs|o|i|�ndS(s(Fail the test if the expression is true.N(R5(RtexprRf((s /usr/lib64/python2.6/unittest.pytfailIf>scCs|p|i|�ndS(s,Fail the test unless the expression is true.N(R5(RRhRf((s /usr/lib64/python2.6/unittest.pyt
failUnlessBscOsey|||�Wn|j
odSXt|d�o
|i}n
t|�}|id|�dS(siFail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
NRs
%s not raised(thasattrRtstrR5(RtexcClasst callableObjR`tkwargstexcName((s /usr/lib64/python2.6/unittest.pytfailUnlessRaisesFs
 cCs2||jp!|i|pd||f�ndS(s[Fail if the two objects are unequal as determined by the '=='
operator.
s%r != %rN(R5(RtfirsttsecondRf((s /usr/lib64/python2.6/unittest.pytfailUnlessEqualWs
cCs2||jo!|i|pd||f�ndS(sYFail if the two objects are equal as determined by the '=='
operator.
s%r == %rN(R5(RRrRsRf((s /usr/lib64/python2.6/unittest.pyt failIfEqual_s
icCsHtt||�|�djo$|i|pd|||f�ndS(sKFail 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.

Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
is%r != %r within %r placesN(troundtabsR5(RRrRstplacesRf((s /usr/lib64/python2.6/unittest.pytfailUnlessAlmostEqualgs cCsHtt||�|�djo$|i|pd|||f�ndS(sIFail 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.

Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
is%r == %r within %r placesN(RvRwR5(RRrRsRxRf((s /usr/lib64/python2.6/unittest.pytfailIfAlmostEqualss N(*RRRCtAssertionErrorR5RRLRMRNRORTRURVRWRYRZRBRRR_RbRcR\RgRiRjRqRtRuRyRzt assertEqualt assertEqualstassertNotEqualtassertNotEqualstassertAlmostEqualtassertAlmostEqualstassertNotAlmostEqualtassertNotAlmostEqualst assertRaisestassert_t
assertTruet assertFalse(((s /usr/lib64/python2.6/unittest.pyR°sB
   
      #          




cBs�eZdZd d�Zd�ZeZd�Zd�Zd
Z d�Z
d�Z d�Z d�Z
d �Zd
�Zd �ZRS(s³A test suite is a composite test consisting of a number of TestCases.

For use, create an instance of TestSuite, then add test case instances.
When all tests have been added, the suite can be passed to a test
runner, such as TextTestRunner. It will run the individual test cases
in the order in which they were added, aggregating the results. When
subclassing, do not forget to call the base class constructor.
cCsg|_|i|�dS(N(t_teststaddTests(Rttests((s /usr/lib64/python2.6/unittest.pyR�s cCsdt|i�|ifS(Ns
<%s tests=%s>(RRAR�(R((s /usr/lib64/python2.6/unittest.pyRB�scCs.t|�t|�j otS|i|ijS(N(R R#R�(RR((s /usr/lib64/python2.6/unittest.pyRV£scCs ||j S(N((RR((s /usr/lib64/python2.6/unittest.pyRW¨scCs
t|i�S(N(titerR�(R((s /usr/lib64/python2.6/unittest.pyt__iter__®scCs.d}x!|iD]}||i�7}qW|S(Ni(R�RN(RtcasesR%((s /usr/lib64/python2.6/unittest.pyRN±s

cCsst|d�ptd��nt|ttif�o&t|ttf�otd��n|i i
|�dS(NRbs the test to add must be callablesNTestCases and TestSuites must be instantiated before passing them to addTest()( Rkt TypeErrorRR RRt
issubclassRRR�R((RR%((s /usr/lib64/python2.6/unittest.pytaddTest·s cCsBt|t�otd��nx|D]}|i|�q'WdS(Ns0tests must be an iterable of tests, not a string(Rt
basestringR�R�(RR�R%((s /usr/lib64/python2.6/unittest.pyR�Ás
cCs1x*|iD]}|ioPn||�q
W|S(N(R�R$(RR]R%((s /usr/lib64/python2.6/unittest.pyR_Çs 

cOs|i||�S(N(R_(RR`Ra((s /usr/lib64/python2.6/unittest.pyRbÎscCs"x|iD]}|i�q
WdS(s7Run the tests without collecting errors in a TestResultN(R�Rc(RR%((s /usr/lib64/python2.6/unittest.pyRcÑs
(N(RRRCRRBRZRVRWRRRYR�RNR�R�R_RbRc(((s /usr/lib64/python2.6/unittest.pyR�s      
  cBszeZdZd d d d�Zd�Zd�Zd�Zd�Zd�Z d�Z
d�Z d �Z d
�Z
d �ZRS(
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.
cCs5ti|�||_||_||_||_dS(N(RRt_FunctionTestCase__setUpFunct_FunctionTestCase__tearDownFunct_FunctionTestCase__testFunct_FunctionTestCase__description(RttestFuncRLRMt description((s /usr/lib64/python2.6/unittest.pyRßs

   cCs"|idj o|i�ndS(N(R�RR(R((s /usr/lib64/python2.6/unittest.pyRLçscCs"|idj o|i�ndS(N(R�RR(R((s /usr/lib64/python2.6/unittest.pyRMëscCs|i�dS(N(R�(R((s /usr/lib64/python2.6/unittest.pyRDïscCs
|iiS(N(R�R(R((s /usr/lib64/python2.6/unittest.pyRUòscCsgt|�t|�j otS|i|ijo6|i|ijo#|i|ijo|i|ijS(N(R R#R�R�R�R�(RR((s /usr/lib64/python2.6/unittest.pyRVõs cCs ||j S(N((RR((s /usr/lib64/python2.6/unittest.pyRWþscCs+tt|�|i|i|i|if�S(N(RXR R�R�R�R�(R((s /usr/lib64/python2.6/unittest.pyRYscCsdt|i�|iifS(Ns%s (%s)(RRAR�R(R((s /usr/lib64/python2.6/unittest.pyRZscCsdt|i�|ifS(Ns<%s testFunc=%s>(RRAR�(R((s /usr/lib64/python2.6/unittest.pyRBscCsI|idj o|iS|ii}|o|id�di�pdS(Ns
i(R�RRR�RCRPRQ(RRS((s /usr/lib64/python2.6/unittest.pyRT s N(RRRCRRRRLRMRDRURVRWRYRZRBRT(((s /usr/lib64/python2.6/unittest.pyRÖs         cBsSeZdZdZeZeZd�Zd�Z dd�Z dd�Z d�Z
RS(s|This class is responsible for loading tests according to various
criteria and returning them wrapped in a TestSuite
R%cCsjt|t�otd��n|i|�}| ot|d�o
dg}n|it||��S(s<Return a suite of all tests cases contained in testCaseClasssYTest cases should not be derived from TestSuite. Maybe you meant to derive from TestCase?RD(R�RR�RRkt
suiteClasstmap(Rt
testCaseClasst
testCaseNames((s /usr/lib64/python2.6/unittest.pytloadTestsFromTestCases 
cCs|g}xft|�D]X}t||�}t|ttif�o*t|t�o|i|i |��qqW|i
|�S(s?Return a suite of all tests cases contained in the given module( tdirRFRR RRR�RR(R�R�(RtmoduleR�tnameR((s /usr/lib64/python2.6/unittest.pytloadTestsFromModule's
c Csò|id�}|djoi|}xQ|oIytdi|��}PWq&tj
o|d=|p�qrq&Xq&W|d}n|}x$|D]}|t||�}}q�Wt|�tijo|i |�St
|tti f�ot |t
�o|i|�St|�tijo@t
|tti f�o't |t
�ot||i�g�St
|t�o|St|d�oV|�}t
|t�o|St
|t
�ot|g�Std||f��ntd|��dS(sTReturn a suite of all tests cases given a string specifier.

The name may resolve either to a module, a test case class, a
test method within a test case class, or a callable object which
returns a TestCase or TestSuite instance.

The method optionally resolves the names relative to a given module.
t.iÿÿÿÿiRbs"calling %s returned %s, not a tests$don't know how to make test from: %sN(RPRRt
__import__R7t ImportErrorRFR Rt
ModuleTypeR RRR�RR�tUnboundMethodTypeRRRkR�( RR�R�tpartst
parts_copyRtparttparentR%((s /usr/lib64/python2.6/unittest.pytloadTestsFromName1sJ 
 cCs:g}|D]}||i||�q ~}|i|�S(s�Return a suite of all tests cases found using the given sequence
of string specifiers. See 'loadTestsFromName()'.
(RªR�(RtnamesR�t_[1]R�tsuites((s /usr/lib64/python2.6/unittest.pytloadTestsFromNames`s-cCsR||id�}t|t|��}|io|idt|i��n|S(sLReturn a sorted sequence of method names found within testCaseClass
cSs&|i|�ott||�d�S(NRb(t
startswithRkRF(tattrnameR�tprefix((s /usr/lib64/python2.6/unittest.pyt isTestMethodjstkey(ttestMethodPrefixtfilterR�tsortTestMethodsUsingtsortR(RR�R²t testFnNames((s /usr/lib64/python2.6/unittest.pyRgs

N(RRRCR´tcmpR¶RR�R�R RRRªR®R(((s /usr/lib64/python2.6/unittest.pyRs
/ cCs3t�}||_||_|o
||_n|S(N(RR¶R´R�(R±t sortUsingR�tloader((s /usr/lib64/python2.6/unittest.pyt _makeLoaderzs    
cCst||�i|�S(N(R¼R(R�R±Rº((s /usr/lib64/python2.6/unittest.pyR�sR%cCst|||�i|�S(N(R¼R�(R�R±RºR�((s /usr/lib64/python2.6/unittest.pyR �scCst|||�i|�S(N(R¼R (R�R±RºR�((s /usr/lib64/python2.6/unittest.pyR
�st_WritelnDecoratorcBs,eZdZd�Zd�Zdd�ZRS(s@Used to decorate file-like objects with a handy 'writeln' methodcCs
||_dS(N(tstream(RR¾((s /usr/lib64/python2.6/unittest.pyR�scCst|i|�S(N(RFR¾(Rtattr((s /usr/lib64/python2.6/unittest.pyt __getattr__�scCs)|o|i|�n|id�dS(Ns
(twrite(Rtarg((s /usr/lib64/python2.6/unittest.pytwriteln�sN(RRRCRRÀRRRÃ(((s /usr/lib64/python2.6/unittest.pyR½�s  t_TextTestResultcBsjeZdZddZddZd�Zd�Zd�Zd�Zd�Z d �Z
d
�Z d �Z RS( shA test result class that can print formatted text results to a stream.

Used by TextTestRunner.
t=iFt-cCsAti|�||_|dj|_|dj|_||_dS(Ni(RRR¾tshowAlltdotst descriptions(RR¾RÉt verbosity((s /usr/lib64/python2.6/unittest.pyR¤s

 cCs0|io|i�p
t|�St|�SdS(N(RÉRTRl(RR%((s /usr/lib64/python2.6/unittest.pytgetDescription«s
cCsXti||�|io:|ii|i|��|iid�|ii�ndS(Ns ... (RR&RÇR¾RÁRËtflush(RR%((s /usr/lib64/python2.6/unittest.pyR&±s

cCs]ti||�|io|iid�n,|io!|iid�|ii�ndS(NR^R¡(RR-RÇR¾RÃRÈRÁRÌ(RR%((s /usr/lib64/python2.6/unittest.pyR-¸s 

cCs`ti|||�|io|iid�n,|io!|iid�|ii�ndS(NtERRORtE(RR+RÇR¾RÃRÈRÁRÌ(RR%R*((s /usr/lib64/python2.6/unittest.pyR+Às 

cCs`ti|||�|io|iid�n,|io!|iid�|ii�ndS(NtFAILtF(RR,RÇR¾RÃRÈRÁRÌ(RR%R*((s /usr/lib64/python2.6/unittest.pyR,Ès 

cCsO|ip
|io|ii�n|id|i�|id|i�dS(NRÍRÏ(RÈRÇR¾RÃtprintErrorListR!R (R((s /usr/lib64/python2.6/unittest.pyt printErrorsÐscCsxxq|D]i\}}|ii|i�|iid||i|�f�|ii|i�|iid|�qWdS(Ns%s: %ss%s(R¾RÃt
separator1RËt
separator2(RtflavourR!R%R*((s /usr/lib64/python2.6/unittest.pyRÑÖs  #(
RRRCRÓRÔRRËR&R-R+R,RÒRÑ(((s /usr/lib64/python2.6/unittest.pyRÄ�s

       cBs5eZdZeiddd�Zd�Zd�ZRS(sÉA test runner class that displays results in textual form.

It prints out the names of tests as they are run, errors as they
occur, and a summary of the results at the end of the test run.
icCs%t|�|_||_||_dS(N(R½R¾RÉRÊ(RR¾RÉRÊ((s /usr/lib64/python2.6/unittest.pyRäs cCst|i|i|i�S(N(RÄR¾RÉRÊ(R((s /usr/lib64/python2.6/unittest.pyt _makeResultésc Cs[|i�}ti�}||�ti�}||}|i�|ii|i�|i}|iid||djodpd|f�|ii�|i�p�|iid�t t
|i |i f�\}}|o|iid|�n|o3|o|iid�n|iid|�n|iid �n|iid
�|S( s&Run the given test case or test suite.sRan %d test%s in %.3fsitsR2sFAILED (s failures=%ds, s errors=%dt)tOK(
RÖttimeRÒR¾RÃRÔR"R/RÁR�R.R R!( RR%R]t startTimetstopTimet timeTakenR_tfailedterrored((s /usr/lib64/python2.6/unittest.pyR_ìs.  
 

  %

!(RRRCRdtstderrRRÖR_(((s /usr/lib64/python2.6/unittest.pyRÞs t TestProgramcBsSeZdZdZdddded�Zdd�Zd�Zd�Z d�Z
RS( sA command-line program that runs a set of tests; this is primarily
for making test modules conveniently executable.
s
Usage: %(progName)s [options] [test] [...]

Options:
-h, --help Show this message
-v, --verbose Verbose output
-q, --quiet Minimal output

Examples:
%(progName)s - run default set of tests
%(progName)s MyTestSuite - run suite 'MyTestSuite'
%(progName)s MyTestCase.testSomething - run MyTestCase.testSomething
%(progName)s MyTestCase - run all 'test*' test methods
in MyTestCase
t__main__cCsÚt|�td�joFt|�|_x=|id�dD]}t|i|�|_q<Wn
||_|djo
ti}nd|_||_ ||_
||_ t i
i|d�|_|i|�|i�dS(NR2R¡ii(R R¢R�RPRFRRRdtargvRÊt defaultTestt
testRunnert
testLoadertostpathtbasenametprogNamet parseArgstrunTests(RR�RäRãRåRæR¨((s /usr/lib64/python2.6/unittest.pyRs 

    
cCs0|o |GHn|i|iGHtid�dS(Ni(tUSAGEt__dict__Rdtexit(RRf((s /usr/lib64/python2.6/unittest.pyt usageExit2s c CsCddk}y |i|dddddg�\}}xc|D][\}}|djo|i�n|djo
d |_n|djo
d|_q>q>Wt|�d jo-|idjo|ii|i�|_ dSt|�d jo
||_
n|if|_
|i �Wn%|i j
o}|i|�nXdS(NiÿÿÿÿithHvqthelptverbosetquiets-hs-Hs--helps-qs--quietis-vs --verbosei(s-hs-Hs--help(s-qs--quiet(s-vs --verbose(
tgetoptRðRÊR.RäRRRæR R�R%t testNamest createTeststerror(RRãRõtoptionsR`toptR;Rf((s /usr/lib64/python2.6/unittest.pyRë7s*  



#
cCs"|ii|i|i�|_dS(N(RæR®RöR�R%(R((s /usr/lib64/python2.6/unittest.pyR÷NscCs«|idjo
t|_nt|ittif�o?y|id|i�}Wq�tj
o|i�}q�Xn
|i}|i |i
�}t i |i
� �dS(NRÊ(RåRRRRR RRRÊR�R_R%RdRïR/(RRåR]((s /usr/lib64/python2.6/unittest.pyRìRs
 N( RRRCRíRRRRRðRëR÷Rì(((s /usr/lib64/python2.6/unittest.pyRá s    RâR�(ii(((((((($RCt
__author__t __email__t __version__RÚRdR8RçRt__all__textendt version_infoRRR t
__metaclass__RR>RRRRRRRRR¼R¹RR R
R½RÄRRáRR(((s /usr/lib64/python2.6/unittest.pyt<module>,sD
      
 KáE@]   
B.V