Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/devscripts/test/__pycache__/ |
Upload File : |
o ���a� � @ sB d Z ddlZddlZddlZddlmZmZ G dd� dej�ZdS )z!test_flake8.py - Run flake8 check� N� )�get_source_files�unittest_verbosityc @ s e Zd ZdZdd� ZdS )�Flake8TestCasez� This unittest class provides a test that runs the flake8 code checker (which combines pycodestyle and pyflakes) on the Python source code. The list of source files is provided by the get_source_files() function. c C s� t jdddgt� }t� dkrt j�d�d�|��� tj |tj tj dd��O}|�� \}}|jd krmg }|rD|� d �|j|�� �� �� |rR|� d�|�� �� �� |s]|� d�|j�� | �d �|�� W d � dS W d � dS 1 sxw Y dS )z&Test: Run flake8 on Python source codez-m�flake8z--max-line-length=99� zRunning following command: {} � T)�stdout�stderr� close_fdsr zBflake8 exited with code {} and has unexpected output on stderr: {}zflake8 found issues: {}zAflake8 exited with code {} and has no output on stdout or stderr.� N)�sys� executabler r r �write�format�join� subprocess�Popen�PIPE�communicate� returncode�append�decode�rstrip�fail)�self�cmd�process�out�err�msgs� r! �=/usr/lib/python3/dist-packages/devscripts/test/test_flake8.py�test_flake8 s8 � � � ���"�zFlake8TestCase.test_flake8N)�__name__� __module__�__qualname__�__doc__r# r! r! r! r"