o
    b                     @   s   d Z ddlmZ ddlZddlmZ g dZejdddd Z	ejddd	d
 Z
ejdddd Zejdd Zejddefdedd fgdd ZdS )zETests for the pylint checker in :mod:`pylint.extensions.check_mccabe
    N)mccabe)z+'f1' is too complex. The McCabe rating is 1z+'f2' is too complex. The McCabe rating is 1z+'f3' is too complex. The McCabe rating is 3z+'f4' is too complex. The McCabe rating is 2z+'f5' is too complex. The McCabe rating is 2z+'f6' is too complex. The McCabe rating is 2z+'f7' is too complex. The McCabe rating is 3z+'f8' is too complex. The McCabe rating is 4z+'f9' is too complex. The McCabe rating is 9z0'method1' is too complex. The McCabe rating is 1z1This 'for' is too complex. The McCabe rating is 4z0'method3' is too complex. The McCabe rating is 2z-'f10' is too complex. The McCabe rating is 11z1'method2' is too complex. The McCabe rating is 18module)scopec                 C      dgS )Nztoo-complex )enabler   r   g/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/extensions/test_check_mccabe.pyr   #      r   c                 C   r   )Nallr   )disabler   r   r   r   (   r	   r   c                 C   s   t jS )N)r   register)r   r   r   r   r   -   r	   r   c                   C   s   t t t tddS )Ndataz	mccabe.py)ospjoindirnameabspath__file__r   r   r   r   fname_mccabe_example2   s   r   zcomplexity, expected	   c                 C   sB   |  d| | |g dd | jjD }t|t|ksJ d S )Nzmax-complexityc                 S   s   g | ]}|j qS r   )msg).0messager   r   r   
<listcomp>>   s    z(test_max_mccabe_rate.<locals>.<listcomp>)Zglobal_set_optioncheckreportermessagessorted)Zlinterr   Z
complexityexpectedZ	real_msgsr   r   r   test_max_mccabe_rate7   s   r   )__doc__os.pathpathr   ZpytestZpylint.extensionsr   ZEXPECTED_MSGSZfixturer   r   r   r   markZparametrizer   r   r   r   r   <module>   s$   






