Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_regrtest.cpython-311.pyc |
�
�Ke=� � �� � d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlmZ ddlmZ ddlmZ ddlmZmZ ej s ej d� � � ee d� � Zej � ej � e� � d d � � Zej � ej �! e� � � � Zd
Z" ej# d� � Z$ G d� d
ej% � � Z& G d� dej% � � Z' G d� de'� � Z( G d� de'� � Z) G d� de'� � Z* G d� dej% � � Z+e,dk r ej- � � dS dS )zM
Tests of regrtest.py.
Note: test_regrtest cannot be run twice in parallel.
� N)�libregrtest)�support)� os_helper)�utils�setupztest module requires subprocess�gettotalrefcountz..z5[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?z�
from signal import SIGINT, raise_signal
try:
raise_signal(SIGINT)
except ImportError:
import os
os.kill(os.getpid(), SIGINT)
c � � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d � Z"d!� Z#d"� Z$d#� Z%d$� Z&d%� Z'd&� Z(d'� Z)d(� Z*d)� Z+d*S )+�ParseArgsTestCasezC
Test regrtest's argument parsing, function _parse_args().
c �8 � t j � � 5 }| � t � � 5 t j |� � d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y | � ||� � � � � d S �N)r �captured_stderr�assertRaises�
SystemExitr �_parse_args�assertIn�getvalue)�self�args�msg�errs �</usr/local/apps/python3/lib/python3.11/test/test_regrtest.py�
checkErrorzParseArgsTestCase.checkError0 s� � �
�
$�
&�
&� *�#�t�/@�/@��/L�/L� *� *��#�D�)�)�)� *� *� *� *� *� *� *� *� *� *� *���� *� *� *� *� *� *� *� *� *� *� *� *� *� *� *���� *� *� *� *��
�
�c�3�<�<�>�>�*�*�*�*�*s4 �A'�A�A'�A �A'�A �A'�'A+�.A+c � � dD ]�}| � |�� � 5 t j � � 5 }| � t � � 5 t j |g� � d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y | � d|� � � � � d d d � � n# 1 swxY w Y ��d S )N)z-hz--help��optzRun Python regression tests.) �subTestr �captured_stdoutr r r r r r )r r �outs r � test_helpzParseArgsTestCase.test_help5 s� � �!� N� N�C����#��&�&�
N�
N��,�.�.� 3�#��&�&�z�2�2�3� 3��+�S�E�2�2�2�3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3���� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3���� 3� 3� 3� 3� �
�
�<�c�l�l�n�n�M�M�M�
N�
N�
N�
N�
N�
N�
N�
N�
N�
N�
N����
N�
N�
N�
N�� N� NsX �C�B�
A, � B�,A0
�0B�3A0
�4B�7C�B�C�
B�+C�C � C c �� � t j ddg� � }| � |j d� � | � dgd� � | � ddgd� � d S )N� --timeoutz4.2g������@�expected one argument�foozinvalid float value)r r �assertEqual�timeoutr �r �nss r �test_timeoutzParseArgsTestCase.test_timeout= sf � �
�
$�k�5�%9�
:�
:�������S�)�)�)�����
�'>�?�?�?�����e�,�.C�D�D�D�D�D� c �d � t j dg� � }| � |j � � d S )N�--wait)r r �
assertTrue�waitr&