ó
'![c           @   s[   d  Z  d d l Z d d l Z d d l m Z d d l m Z d d l m Z d   Z	 d S(   s   Test for the JSON reporter.i’’’’N(   t   PyLinter(   t   checkers(   t   JSONReporterc       
   C   sū   t  j   }  t   } t d |  } t j |  d | j _ | j j	 |   | j
   | j d  | j d d d d d | j d   d d d d d d d d d  g	 g } t j |  j    } t | d j   d d   g } | | k s÷ t  d  S(!   Nt   reporteri    t   0123s   line-too-longt   linei   t   argsi   t   columnt   messages   Line too long (1/2)s
   message-idt   C0301t   modulet   objt    t   patht   symbolt   typet
   conventiont   keyc         S   s   |  d S(   Ni    (    (   t   item(    (    sB   lib/python2.7/site-packages/pylint/test/unittest_reporters_json.pyt   <lambda>2   s    (   i   i   (   R   i    (   R   i   (   R   s   Line too long (1/2)(   s
   message-idR	   (   R
   R   (   R   R   (   R   R   (   R   s   line-too-long(   R   R   (   t   sixt   StringIOR   R    R   t
   initializet   configt
   persistentR   t
   set_outputt   opent   set_current_modulet   add_messaget   display_messagest   Nonet   jsont   loadst   getvaluet   sortedt   itemst   AssertionError(   t   outputR   t   lintert   expected_resultt   report_result(    (    sB   lib/python2.7/site-packages/pylint/test/unittest_reporters_json.pyt   test_simple_json_output   s.    	
(
   t   __doc__R   R   t   pylint.lintR    t   pylintR   t   pylint.reporters.jsonR   R)   (    (    (    sB   lib/python2.7/site-packages/pylint/test/unittest_reporters_json.pyt   <module>
   s   