£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
a
    XC?hs                     @   sn   d Z ddlZddlZddlZddlmZ ddlmZ dZG dd de	Z
G d	d
 d
ejZG dd de	ZdS )zRunning tests    N   )result)registerResultTc                   @   s*   e Zd ZdZdd Zdd Zd	ddZdS )
_WritelnDecoratorz@Used to decorate file-like objects with a handy 'writeln' methodc                 C   s
   || _ d S N)stream)selfr    r	   4/opt/alt/python39/lib64/python3.9/unittest/runner.py__init__   s    z_WritelnDecorator.__init__c                 C   s   |dv rt |t| j|S )N)r   __getstate__)AttributeErrorgetattrr   )r   attrr	   r	   r
   __getattr__   s    z_WritelnDecorator.__getattr__Nc                 C   s   |r|  | |  d d S N
)write)r   argr	   r	   r
   writeln   s    
z_WritelnDecorator.writeln)N)__name__
__module____qualname____doc__r   r   r   r	   r	   r	   r
   r      s   r   c                       s   e Zd ZdZdZdZ fddZdd Z fdd	Z fd
dZ	 fddZ
 fddZ fddZ fddZ fddZdd Zdd Z  ZS )TextTestResultzhA test result class that can print formatted text results to a stream.

    Used by TextTestRunner.
    zF======================================================================zF----------------------------------------------------------------------c                    s8   t t| ||| || _|dk| _|dk| _|| _d S )Nr   )superr   r   r   showAlldotsdescriptions)r   r   r   	verbosity	__class__r	   r
   r   %   s
    

zTextTestResult.__init__c                 C   s0   |  }| jr$|r$dt||fS t|S d S r   )ZshortDescriptionr   joinstr)r   testZdoc_first_liner	   r	   r
   getDescription,   s    
zTextTestResult.getDescriptionc                    sB   t t| | | jr>| j| | | jd | j  d S )Nz ... )r   r   	startTestr   r   r   r%   flushr   r$   r    r	   r
   r&   3   s
    zTextTestResult.startTestc                    sN   t t| | | jr.| jd | j  n| jrJ| jd | j  d S )Nok.)	r   r   
addSuccessr   r   r   r'   r   r   r(   r    r	   r
   r+   :   s    zTextTestResult.addSuccessc                    sP   t t| || | jr0| jd | j  n| jrL| jd | j  d S )NERRORE)	r   r   addErrorr   r   r   r'   r   r   r   r$   errr    r	   r
   r.   C   s    zTextTestResult.addErrorc                    sP   t t| || | jr0| jd | j  n| jrL| jd | j  d S )NFAILF)	r   r   
addFailurer   r   r   r'   r   r   r/   r    r	   r
   r3   L   s    zTextTestResult.addFailurec                    sV   t t| || | jr6| jd| | j  n| jrR| j	d | j  d S )Nzskipped {0!r}s)
r   r   addSkipr   r   r   formatr'   r   r   )r   r$   reasonr    r	   r
   r5   U   s    zTextTestResult.addSkipc                    sP   t t| || | jr0| jd | j  n| jrL| jd | j  d S )Nzexpected failurex)	r   r   addExpectedFailurer   r   r   r'   r   r   r/   r    r	   r
   r9   ^   s    z!TextTestResult.addExpectedFailurec                    sN   t t| | | jr.| jd | j  n| jrJ| jd | j  d S )Nzunexpected successu)	r   r   addUnexpectedSuccessr   r   r   r'   r   r   r(   r    r	   r
   r;   g   s    z#TextTestResult.addUnexpectedSuccessc                 C   s@   | j s| jr | j  | j  | d| j | d| j d S )Nr,   r1   )r   r   r   r   r'   printErrorListerrorsfailuresr   r	   r	   r
   printErrorsp   s
    

zTextTestResult.printErrorsc                 C   sb   |D ]X\}}| j | j | j d|| |f  | j | j | j d|  | j   qd S )Nz%s: %sz%s)r   r   
separator1r%   
separator2r'   )r   Zflavourr=   r$   r0   r	   r	   r
   r<   w   s    zTextTestResult.printErrorList)r   r   r   r   rA   rB   r   r%   r&   r+   r.   r3   r5   r9   r;   r@   r<   __classcell__r	   r	   r    r
   r      s   						r   c                   @   s4   e Zd ZdZeZdddddZd	d
 Zdd ZdS )TextTestRunnerzA 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.
    NTr   F)	tb_localsc          	      C   sN   |du rt j}t|| _|| _|| _|| _|| _|| _|| _	|durJ|| _
dS )zConstruct a TextTestRunner.

        Subclasses should accept **kwargs to ensure compatibility as the
        interface changes.
        N)sysstderrr   r   r   r   failfastbufferrE   warningsresultclass)	r   r   r   r   rH   rI   rK   rJ   rE   r	   r	   r
   r      s    
zTextTestRunner.__init__c                 C   s   |  | j| j| jS r   )rK   r   r   r   r?   r	   r	   r
   _makeResult   s    zTextTestRunner._makeResultc                 C   sl  |   }t| | j|_| j|_| j|_t  | jr^t| j | jdv r^tjdt	dd t
 }t|dd}|dur|  z&|| W t|dd}|dur|  nt|dd}|dur|  0 t
 }W d   n1 s0    Y  || }|  t|dr| j|j |j}| jd	||d
kr4dp6d|f  | j  d }	 }
}ztt|j|j|jf}W n ty   Y n0 |\}	}
}g }| s| jd t|jt|j }}|r|d|  |r|d|  n| jd |r
|d|  |	r|d|	  |
r2|d|
  |rR| jdd|f  n| jd | j  |S )z&Run the given test case or test suite.)defaultalwaysmodulezPlease use assert\w+ instead.)categorymessagestartTestRunNstopTestRunrB   zRan %d test%s in %.3fsr   r4    r   ZFAILEDzfailures=%dz	errors=%dZOKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (%s)z, r   ) rL   r   rH   rI   rE   rJ   catch_warningssimplefilterfilterwarningsDeprecationWarningtimeperf_counterr   r@   hasattrr   r   rB   ZtestsRunmaplenZexpectedFailuresunexpectedSuccessesskippedr   ZwasSuccessfulr   r>   r=   appendr"   r'   )r   r$   r   Z	startTimerR   rS   ZstopTimeZ	timeTakenrunZexpectedFailsr^   r_   ZresultsZinfosZfailedZerroredr	   r	   r
   ra      s    


&




zTextTestRunner.run)NTr   FFNN)	r   r   r   r   r   rK   r   rL   ra   r	   r	   r	   r
   rD      s     rD   )r   rF   rY   rJ   rT   r   Zsignalsr   Z
__unittestobjectr   Z
TestResultr   rD   r	   r	   r	   r
   <module>   s   c