ó
±éRc           @  sŽ   d  d l  m Z d  d l Z d  d l m Z m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e	 f d	 „  ƒ  YZ
 d
 e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   print_functionN(   t
   ErrorClasst   ErrorClassPlugint   KnownFailureTestc           B  s   e  Z d  Z RS(   s<   Raise this exception to mark a test as a known failing test.(   t   __name__t
   __module__t   __doc__(    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyR      s   t   KnownFailureDidNotFailTestc           B  s   e  Z d  Z RS(   sC   Raise this exception to mark a test should have failed but did not.(   R   R   R   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyR   	   s   t   ImageComparisonFailurec           B  s   e  Z d  Z RS(   sG   Raise this exception to mark a test as a comparison between two images.(   R   R   R   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyR      s   t   KnownFailurec           B  sM   e  Z d  Z e Z e e d d d e ƒZ e	 j
 d „ Z d „  Z d „  Z RS(   sx  Plugin that installs a KNOWNFAIL error class for the
    KnownFailureClass exception.  When KnownFailureTest is raised,
    the exception will be logged in the knownfail attribute of the
    result, 'K' or 'KNOWNFAIL' (verbose) will be output, and the
    exception will not be counted as an error or failure.

    This is based on numpy.testing.noseclasses.KnownFailure.
    t   labelt	   KNOWNFAILt	   isfailurec      
   C  s;   d } | j  d d d d d d | j | t ƒ d d	 ƒd  S(
   Nt   NOSE_WITHOUT_KNOWNFAILs   --no-knownfailt   actiont
   store_truet   destt   noKnownFailt   defaultt   helps7   Disable special handling of KnownFailureTest exceptions(   t
   add_optiont   gett   False(   t   selft   parsert   envt   env_opt(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyt   options   s    c         C  s>   |  j  s d  S| |  _ t | d t ƒ } | r: t |  _ n  d  S(   NR   (   t   can_configuret   conft   getattrR   t   enabled(   R   R   R   t   disable(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyt	   configure%   s    		c         G  s   d  S(   N(    (   R   t   testt   errt   zero_nine_capt_args(    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyt   addError-   s    (   R   R   R   t   TrueR   R   R   R   t	   knownfailt   ost   environR   R!   R%   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyR	      s   			(   t
   __future__R    R(   t   nose.plugins.errorclassR   R   t	   ExceptionR   R   t   AssertionErrorR   R	   (    (    (    sX   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/testing/noseclasses.pyt   <module>   s   