3
d$                 @   sn   d Z ddlZy0ddlmZmZ ddlmZ dd Zdd ZW n$ e	k
r`   d	d Zd
d ZY nX dd Z
dS )z Non-standard functions for the 'nose' testing framework

This module is deprecated, and will be removed in a future release.

.. deprecated:: 6.1.0

    N)DeprecatedTestSkipTest)make_decoratorc             C   s$   t jdtdd dd }t| |S )zY Decorator to indicate a test should be skipped.

        .. deprecated:: 6.1.0

        zDThe traits.testing.nose_tools module and its contents are deprecated   )
stacklevelc              _   s
   t  d S )N)r   )argskw r	   ;/tmp/pip-build-7vycvbft/traits/traits/testing/nose_tools.pyg&   s    zskip.<locals>.g)warningswarnDeprecationWarningr   )fr   r	   r	   r
   skip   s    r   c             C   s$   t jdtdd dd }t| |S )zU Decorator to indicate a test is deprecated.

        .. deprecated:: 6.1.0

        zDThe traits.testing.nose_tools module and its contents are deprecatedr   )r   c              _   s
   t  d S )N)r   )r   r   r	   r	   r
   r   8   s    zdeprecated.<locals>.g)r   r   r   r   )r   r   r	   r	   r
   
deprecated+   s    r   c             C   s   t jdtdd t jd | S )z Stub replacement for marking a unit test to be skipped in the
        absence of 'nose'.

        .. deprecated:: 6.1.0
        zDThe traits.testing.nose_tools module and its contents are deprecatedr   )r   z/skipping unit tests requires the package 'nose')r   r   r   )r   r	   r	   r
   r   A   s    
c             C   s   t jdtdd t jd | S )z~ Stub replacement for marking a unit test deprecated in the absence
        of 'nose'.

        .. deprecated:: 6.1.0
        zDThe traits.testing.nose_tools module and its contents are deprecatedr   )r   z:skipping deprecated unit tests requires the package 'nose')r   r   r   )r   r	   r	   r
   r   Q   s    c             C   s   t jdtdd d| _| S )z{ Decorator to add an attribute to the test to mark it as
    a performance-measuring test.

    .. deprecated:: 6.1.0

    zDThe traits.testing.nose_tools module and its contents are deprecatedr   )r   T)r   r   r   performance)r   r	   r	   r
   r   d   s    r   )__doc__r   Znoser   r   Z
nose.toolsr   r   r   ImportErrorr   r	   r	   r	   r
   <module>   s   