HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/devscripts/test/__pycache__/test_pylint.cpython-310.pyc
o

���aN
�@s�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZej�
ej�e�d�Zdd�Ze�e�d	�Gd
d�dej��ZdS)ztest_pylint.py - Run pylint�N)�Version�)�get_source_files�unittest_verbosityzpylint.confcCsttj�td�kS)Nz2.11.1)r�pylint�__version__�rr�=/usr/lib/python3/dist-packages/devscripts/test/test_pylint.py�check_pylint_versionsr
zpylint version not supportedc@seZdZdZdd�ZdS)�PylintTestCasez�
    This unittest class provides a test that runs the pylint code check
    on the Python source code. The list of source files is provided by
    the get_source_files() function and pylint is purely configured via
    a config file.
    cCs4t�}|�d�tjdddtdg|}t�dkr%tj�d�d�	|���t
j|t
jt
jd	d
��`}|�
�\}}|jdkr�tjdd
|��tjd���}t�dd
|�����}g}|rc|�d�|j|��|rm|�d�|��|sx|�d�|j��|�d�	|��Wd�dSWd�dS1s�wYdS)z&Test: Run pylint on Python source code�
debootsnapz-mrz	--rcfile=z--�zRunning following command:
{}
� T)�stdout�stderr�	close_fdsrz%^(-+|Your code has been rated at .*)$�)�flagsz^Using config file .*
zBpylint exited with code {} and has unexpected output on stderr:
{}zpylint found issues:
{}zApylint exited with code {} and has no output on stdout or stderr.�
N)r�remove�sys�
executable�CONFIGrr�write�format�join�
subprocess�Popen�PIPE�communicate�
returncode�re�sub�decode�	MULTILINE�rstrip�append�fail)�self�files�cmd�process�out�err�msgsrrr	�test_pylint,s@

�
��
���"�zPylintTestCase.test_pylintN)�__name__�
__module__�__qualname__�__doc__r/rrrr	r#sr)r3�osr!rr�unittestr�debian.debian_supportrrrr�pathr�dirname�__file__rr
�skipIf�TestCaserrrrr	�<module>s