File: //opt/alt/python27/lib/python2.7/site-packages/nose/tools/nontrivial.pyc
�
k�6Sc           @   s�   d  Z  d d l Z d d d d d d d	 d
 g Z d e f d �  �  YZ d �  Z d
 �  Z d �  Z d �  Z d d d � Z
 d �  Z d �  Z d S(   s8   Tools not exempt from being descended into in tracebacksi����Nt   make_decoratort   raisest	   set_tracet   timedt
   with_setupt   TimeExpiredt   istestt   nottestc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sF   /opt/alt/python27/lib/python2.7/site-packages/nose/tools/nontrivial.pyR   
   s   c            s   �  f d �  } | S(   s�   
    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 � si �  j j |  _ n  y
 | |  _ Wn t	 k
 r� | |  _ n X|  S(   Nt   compat_func_namet   compat_co_firstlineno(
   t   hasattrR
   R   t   __dict__t   __doc__R	   t	   func_codet   co_firstlinenoR   t	   TypeError(   t   newfunct   name(   t   func(    sF   /opt/alt/python27/lib/python2.7/site-packages/nose/tools/nontrivial.pyt   decorate   s    	
(    (   R   R   (    (   R   sF   /opt/alt/python27/lib/python2.7/site-packages/nose/tools/nontrivial.pyR       s    c             s;   d j  g  �  D] } | j ^ q
 � � �  � f d �  } | S(   s�  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.
    s    or c            s7   �  j  � � �  � � f d �  } t �  � | � } | S(   Nc             sN   y � |  | �  Wn �  k
 r$ n&