ó
'![c           @   s²   d  Z  d d l m Z d d l m Z m Z d d l m Z d d l Z e j	 d d  d    Z
 e j	 d d  d	    Z d
   Z e j j e d k  d d d    Z d S(   sO   Tests for the pylint checker in :mod:`pylint.extensions.overlapping_exceptions
i˙˙˙˙(   t   version_info(   t   joint   dirname(   t   OverlappingExceptionsCheckerNt   scopet   modulec         C   s   t  S(   N(   R   (   t   checker(    (    sQ   lib/python2.7/site-packages/pylint/test/extensions/test_overlapping_exceptions.pyR      s    c         C   s   d g S(   Nt   I(    (   t   disable(    (    sQ   lib/python2.7/site-packages/pylint/test/extensions/test_overlapping_exceptions.pyR      s    c      
   C   sô   t  t t  d d  } |  j | g  |  j j } d d d d d d d d d g	 } t |  t |  k ss t  xz t | |  D]i \ } } | j	 d k s¤ t  | j
 d k sı t  | j d k sÎ t  | j | j f | k s t  q Wd  S(   Nt   datas   overlapping_exceptions.pyi   sE   Overlapping exceptions (SomeException and SomeException are the same)i   sP   Overlapping exceptions (SomeException is an ancestor class of SubclassException)i   sF   Overlapping exceptions (SomeException and AliasException are the same)i   sQ   Overlapping exceptions (AliasException is an ancestor class of SubclassException)i"   i'   sS   Overlapping exceptions (ArithmeticError is an ancestor class of FloatingPointError)i,   sN   Overlapping exceptions (ValueError is an ancestor class of UnicodeDecodeError)t   W0714s   overlapping-exceptt   warning(   i   sE   Overlapping exceptions (SomeException and SomeException are the same)(   i   sP   Overlapping exceptions (SomeException is an ancestor class of SubclassException)(   i   sF   Overlapping exceptions (SomeException and AliasException are the same)(   i   sQ   Overlapping exceptions (AliasException is an ancestor class of SubclassException)(   i"   sF   Overlapping exceptions (SomeException and AliasException are the same)(   i"   sP   Overlapping exceptions (SomeException is an ancestor class of SubclassException)(   i"   sQ   Overlapping exceptions (AliasException is an ancestor class of SubclassException)(   i'   sS   Overlapping exceptions (ArithmeticError is an ancestor class of FloatingPointError)(   i,   sN   Overlapping exceptions (ValueError is an ancestor class of UnicodeDecodeError)(   R   R   t   __file__t   checkt   reportert   messagest   lent   AssertionErrort   zipt   msg_idt   symbolt   categoryt   linet   msg(   t   lintert   testt   msgst   expectedR   t   exp(    (    sQ   lib/python2.7/site-packages/pylint/test/extensions/test_overlapping_exceptions.pyt   test_overlapping_exceptions   s$    	i   t   reasons   not relevant to Python versionc         C   sâ   t  t t  d d  } |  j | g  |  j j } d d d g } t |  t |  k sa t  xz t | |  D]i \ } } | j	 d	 k s t  | j
 d
 k s§ t  | j d k sĵ t  | j | j f | k sq t  qq Wd S(   sF   From Python 3.3 both IOError and socket.error are aliases for OSError.R	   s   overlapping_exceptions_py33.pyi   s9   Overlapping exceptions (IOError and OSError are the same)i   s>   Overlapping exceptions (socket.error and OSError are the same)i   sM   Overlapping exceptions (socket.error is an ancestor class of ConnectionError)R
   s   overlapping-exceptR   N(   i   s9   Overlapping exceptions (IOError and OSError are the same)(   i   s>   Overlapping exceptions (socket.error and OSError are the same)(   i   sM   Overlapping exceptions (socket.error is an ancestor class of ConnectionError)(   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   (    (    sQ   lib/python2.7/site-packages/pylint/test/extensions/test_overlapping_exceptions.pyt    test_overlapping_exceptions_py332   s    	(   i   i   (   t   __doc__t   sysR    t   os.pathR   R   t(   pylint.extensions.overlapping_exceptionsR   t   pytestt   fixtureR   R   R   t   markt   skipifR   (    (    (    sQ   lib/python2.7/site-packages/pylint/test/extensions/test_overlapping_exceptions.pyt   <module>   s   	