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_help.cpython-310.pyc
o

���a��@sfddlZddlZddlZddlZddlZddlZddlZddlmZdZ	dd�Z
Gdd�dej�ZdS)	�N�)�SCRIPTS�cCs$t��}t��|�|�t��|S)zDGive HelpTestCase a chance to populate before loading its test cases)�unittest�	TestSuite�HelpTestCase�populate�addTests�loadTestsFromTestCase)�loader�tests�pattern�suite�r�;/usr/lib/python3/dist-packages/devscripts/test/test_help.py�
load_testssrc@s$eZdZedd��Zedd��ZdS)rcCs,tD]}|dkrt|d||�|��qdS)N�
debootsnap�test_)r�setattr�make_help_tester)�cls�scriptrrrr's
��zHelpTestCase.populatecs�fdd�}|S)Nc
sTtjd�dgdtjtjtjd��{}t��}g}|j��|j��g}|D]}t�|tj	t�|tj
�tjB�q$t��|t
krdt�|g|t
�dD]}|�t�|d��qI|��dur\nt��|t
ks?|��dur�t�|jtj�t�d�|��dur�t�|jtj�Wd�n1s�wY|�|��dd�t
d	�d
��|�f�dS)Nz./z--helpT)�	close_fds�stdin�stdout�stderrrirz7%s failed to return usage within %i seconds.
Output:
%s��ascii)�
subprocess�Popen�DEVNULL�PIPE�timer�filenor�fcntl�F_SETFL�F_GETFL�os�
O_NONBLOCK�TIMEOUT�select�append�read�poll�kill�pid�signal�SIGTERM�sleep�SIGKILL�assertEqual�encode�join)�self�process�started�out�fds�fd�rrr�tester0s>�
��
����z-HelpTestCase.make_help_tester.<locals>.testerr)rrr>rr=rr.szHelpTestCase.make_help_testerN)�__name__�
__module__�__qualname__�classmethodrrrrrrr&s

r)
r$r'r*r0rr"rrrr)r�TestCaserrrrr�<module>s