o
    b                     @   sH   d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 dd Z
dS )	zTest for the JSON reporter.    N)StringIO)PyLinter)checkers)JSONReporterc                  C   s   t  } t }t|d}t| d|j_|j|  |	  |
d |jdddd |d  g dg}t|  }t|d  d	d
 dg}||ksOJ d S )N)reporterr   0123line-too-long   )r	      )lineargs)	)columnr   )r   r	   )messagezLine too long (1/2))z
message-idZC0301)moduler   )obj )pathr   )symbolr   )typeZ
conventionc                 S   s   | d S )Nr    )itemr   r   b/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/unittest_reporters_json.py<lambda>4   s    z)test_simple_json_output.<locals>.<lambda>)key)r   r   r   r   Z
initializeconfig
persistentr   Z
set_outputopenZset_current_moduleZadd_messageZdisplay_messagesjsonloadsgetvaluesorteditems)outputr   ZlinterZexpected_resultZreport_resultr   r   r   test_simple_json_output   s   



r#   )__doc__r   ior   Zpylint.lintr   Zpylintr   Zpylint.reporters.jsonr   r#   r   r   r   r   <module>   s   
