ó
'![c           @   sü   d  Z  d d l j Z d d l Z d d l m Z d d d d d d	 d
 d d d d d d d g Z e j d d  d    Z	 e j d d  d    Z
 e j d d  d    Z e j d    Z e j j d d e f d e d f g  d    Z d S(   sE   Tests for the pylint checker in :mod:`pylint.extensions.check_mccabe
i˙˙˙˙N(   t   mccabes+   'f1' is too complex. The McCabe rating is 1s+   'f2' is too complex. The McCabe rating is 1s+   'f3' is too complex. The McCabe rating is 3s+   'f4' is too complex. The McCabe rating is 2s+   'f5' is too complex. The McCabe rating is 2s+   'f6' is too complex. The McCabe rating is 2s+   'f7' is too complex. The McCabe rating is 3s+   'f8' is too complex. The McCabe rating is 4s+   'f9' is too complex. The McCabe rating is 9s0   'method1' is too complex. The McCabe rating is 1s1   This 'for' is too complex. The McCabe rating is 4s0   'method3' is too complex. The McCabe rating is 2s-   'f10' is too complex. The McCabe rating is 11s1   'method2' is too complex. The McCabe rating is 18t   scopet   modulec         C   s   d g S(   Ns   too-complex(    (   t   enable(    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyR   #   s    c         C   s   d g S(   Nt   all(    (   t   disable(    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyR   (   s    c         C   s   t  j S(   N(   R    t   register(   R   (    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyR   -   s    c           C   s%   t  j t  j t  j t   d d  S(   Nt   datas	   mccabe.py(   t   ospt   joint   dirnamet   abspatht   __file__(    (    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyt   fname_mccabe_example2   s    s   complexity, expectedi    i	   iţ˙˙˙c         C   sd   |  j  d |  |  j | g  g  |  j j D] } | j ^ q- } t |  t |  k s` t  d  S(   Ns   max-complexity(   t   global_set_optiont   checkt   reportert   messagest   msgt   sortedt   AssertionError(   t   linterR   t
   complexityt   expectedt   messaget	   real_msgs(    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyt   test_max_mccabe_rate7   s    "(   t   __doc__t   os.patht   pathR   t   pytestt   pylint.extensionsR    t   EXPECTED_MSGSt   fixtureR   R   R   R   t   markt   parametrizeR   (    (    (    sG   lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.pyt   <module>	   s0   		