
'![c           @   s   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d  d l m Z m Z d  d l	 Z	 e	 j
 d d  d    Z e	 j
 d d  d    Z d	   Z d
   Z d   Z d   Z d S(   iN(   t   PyLinter(   t   checkers(   t   TextReportert   ParseableTextReportert   scopet   modulec         C   s   t  S(   N(   R   (   t   reporter(    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyR      s    c         C   s   d g S(   Nt   I(    (   t   disable(    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyR      s    c         C   s   t  j   } |  j j |  |  j d d  |  j   |  j d  |  j d d d d d |  j d	 d d d d | j   d k s t	  d  S(   Ns   msg-templates   {msg_id}:{line:03d}t   0123t   C0301t   linei   t   argsi   s   line-too-longi   i   s.   ************* Module 0123
C0301:001
C0301:002
(   i   i   (   i   i   (
   t   sixt   StringIOR   t
   set_outputt
   set_optiont   opent   set_current_modulet   add_messaget   getvaluet   AssertionError(   t   lintert   output(    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt   test_template_option    s    
	c          C   sg   t  j d t   }  t  j d  t   Wd  QXt |   d k sG t  t |  d j t	  sc t  d  S(   Nt   recordt   alwaysi   i    (
   t   warningst   catch_warningst   Truet   simplefilterR   t   lenR   t
   isinstancet   messaget   DeprecationWarning(   t   cm(    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt    test_parseable_output_deprecated.   s
    c          C   s   t  j   }  t j d t   t d t    } Wd  QXt j |  d | j	 _
 | j j |   | j d d  | j   | j d  | j d d d	 d
 d |  j   d k s t  d  S(   NR   R   i    s   output-formatt	   parseableR	   s   line-too-longR   i   R   i   sO   ************* Module 0123
0123:1: [C0301(line-too-long), ] Line too long (1/2)
(   i   i   (   R   R   R   R   R   R    R   R   t
   initializet   configt
   persistentR   R   R   R   R   R   R   R   (   R   R   (    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt    test_parseable_output_regression7   s    
	c          C   s@   d t  f d     Y}  |    } t j t   | j Wd  QXd  S(   Nt   CustomReporterc           B   s   e  Z d    Z RS(   c         S   s   d  S(   N(   t   None(   t   selft   layout(    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt   _displayK   s    (   t   __name__t
   __module__R.   (    (    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyR*   J   s   (   R   t   pytestt   raisest   AttributeErrort   display_results(   R*   R   (    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt   test_display_results_is_renamedI   s    	(   R   R   t   pylint.lintR    t   pylintR   t   pylint.reporters.textR   R   R1   t   fixtureR   R   R   R$   R)   R5   (    (    (    s=   lib/python2.7/site-packages/pylint/test/unittest_reporting.pyt   <module>   s   				