U
    Z¬Üeù  ã                   @   sN   d dl Z d dlZd dlmZ d dlmZ e  e¡ZdgZ	G dd„ dej
ƒZdS )é    N)Ú	format_tb)Úis_base_exceptionÚFailurec                   @   s6   e Zd ZdZdZddd„Zdd„ Zdd	„ Zd
d„ ZdS )r   záUnloadable or unexecutable test.

    A Failure case is placed in a test suite to indicate the presence of a
    test that could not be loaded or executed. A common example is a test
    module that fails to import.
    
    FNc                 C   s<   t  d||t|ƒ¡ || _|| _|| _|| _tj 	| ¡ d S )NzA failure! %s %s %s)
ÚlogÚdebugr   Ú	exc_classÚexc_valÚtbÚ_addressÚunittestÚTestCaseÚ__init__)Úselfr   r   r	   Úaddress© r   úk/mounts/lovelace/software/anaconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/nose/failure.pyr      s    zFailure.__init__c                 C   s   dt | jd| jƒ| jf S )NzFailure: %s (%s)Ú__name__)Úgetattrr   r   ©r   r   r   r   Ú__str__   s     ÿzFailure.__str__c                 C   s   | j S ©N)r
   r   r   r   r   r   !   s    zFailure.addressc                 C   sH   | j d k	r8t| jƒr"| j | j ¡‚|  | j¡ | j ¡‚n|  | j¡‚d S r   )r	   r   r   Úwith_tracebackr   r   r   r   r   ÚrunTest$   s
    

zFailure.runTest)NN)	r   Ú
__module__Ú__qualname__Ú__doc__Z__test__r   r   r   r   r   r   r   r   r      s   
)Úloggingr   Ú	tracebackr   Znose.pyversionr   Ú	getLoggerr   r   Ú__all__r   r   r   r   r   r   Ú<module>   s   
