Your IP : 216.73.216.213
�^�]J � @ s� d Z d d l Z d d d d d d d d
g Z Gd d � d e � Z d d � Z d
d � Z d d � Z d d � Z d d d d � Z d d � Z
d d
� Z d S)z8Tools not exempt from being descended into in tracebacks� N�make_decorator�raises� set_trace�timed�
with_setup�TimeExpired�istest�nottestc @ s e Z d Z d S)r N)�__name__�
__module__�__qualname__� r
r
�F/opt/alt/python35/lib/python3.5/site-packages/nose/tools/nontrivial.pyr
s c s � f d d � } | S)z�
Wraps a test decorator so as to properly replicate metadata
of the decorated function, including nose's additional stuff
(namely, setup and teardown).
c s� t � d � r � j } n � j } � j | _ � j | _ � j | _ t | d � sf � j j | _ y
| | _ Wn t k
r� | | _ Yn X| S)N�compat_func_name�compat_co_firstlineno)
�hasattrr r
�__dict__�__doc__r �__code__�co_firstlinenor � TypeError)�newfunc�name)�funcr
r �decorate s
z make_decorator.<locals>.decorater
)r r r
)r r r s c s5 d j d d � � D� � � � � f d d � } | S)a� Test must raise one of expected exceptions to pass.
Example use::
@raises(TypeError, ValueError)
def test_raises_type_error():
raise TypeError("This test passes")
@raises(Exception)
def test_that_fails_by_passing():
pass
If you want to test many assertions about exceptions in a single test,
you may want to use `assert_raises` instead.
z or c S s g | ] } | j � q Sr
)r
)�.0�er
r
r �
<listcomp>7 s zraises.<locals>.<listcomp>c s: � j � � � � � f d d � } t � � | � } | S)Nc sP y � | | � Wn � k
r% Yn'