a
    ñ»j›  ã                   @   s8   d Z ddlmZmZ G dd„ deƒZG dd„ deƒZdS )aƒ  This plugin installs DEPRECATED error class for the :class:`DeprecatedTest`
exception. When :class:`DeprecatedTest` is raised, the exception will be logged
in the deprecated attribute of the result, ``D`` or ``DEPRECATED`` (verbose)
will be output, and the exception will not be counted as an error or failure.
It is enabled by default but can be turned off by using ``--no-deprecated``.é    )Ú
ErrorClassÚErrorClassPluginc                   @   s   e Zd ZdZdS )ÚDeprecatedTestz2Raise this exception to mark a test as deprecated.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r	   r	   ú=E:\soccer\ml_env\Lib\site-packages\nose/plugins/deprecated.pyr   	   s   r   c                   @   s2   e Zd ZdZdZeeddd�Zdd„ Zdd	„ Z	d
S )Ú
Deprecatedz[Installs a DEPRECATED error class for the DeprecatedTest exception.
    Enabled by default.TZ
DEPRECATEDF)ÚlabelZ	isfailurec                 C   s$   d}|j ddd| |d¡dd� dS )	zRegister commandline options.ZNOSE_WITHOUT_DEPRECATEDz--no-deprecatedÚ
store_trueÚnoDeprecatedFz6Disable special handling of DeprecatedTest exceptions.)ÚactionÚdestÚdefaultÚhelpN)Ú
add_optionÚget)ÚselfÚparserÚenvZenv_optr	   r	   r
   Úoptions   s    ýzDeprecated.optionsc                 C   s*   | j s
dS || _t|ddƒ}|r&d| _dS )zConfigure plugin.Nr   F)Zcan_configureÚconfÚgetattrÚenabled)r   r   r   Údisabler	   r	   r
   Ú	configure   s    zDeprecated.configureN)
r   r   r   r   r   r   r   Ú
deprecatedr   r   r	   r	   r	   r
   r      s   ÿ	r   N)r   Znose.plugins.errorclassr   r   Ú	Exceptionr   r   r	   r	   r	   r
   Ú<module>   s   