%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/test/libregrtest/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/test/libregrtest/__pycache__/single.cpython-312.pyc

�

3�+g�)�	�N�ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZddlmZddlmZdd	lmZdd
lmZddlmZmZmZmZmZdZ d
�Z!d�Z"d�Z#dededdfd�Z$gZ%dededdfd�Z&	ddedede'ddfd�Z(dededdfd�Z)dededefd�Z*y)�N)�support)�threading_helper�)�
match_test)�State�
TestResult�	TestStats)�RunTests)�saved_test_environment)�setup_tests)�get_test_runner)�TestName�clear_caches�
remove_testfn�abs_module_name�
print_warningg>@c��tj�}|j|�}|jD]}t	|t
j���|jrtd��t|t�t|�S)N)�filezerrors while loading tests)�unittest�
TestLoader�loadTestsFromModule�errors�print�sys�stderr�	Exception�
_filter_suiter�
_run_suite)�test_mod�loader�tests�errors    �./usr/lib/python3.12/test/libregrtest/single.py�run_unittestr$si��
�
 �
 �
"�F��&�&�x�0�E����&��
�e�#�*�*�%�&�
�}�}��4�5�5��%��$��e���c���g}|jD]T}t|tj�rt	||�|j|��;||�s�D|j|��V||_y)z>Recursively filter test cases in a suite based on a predicate.N)�_tests�
isinstancer�	TestSuiter�append)�suite�pred�newtests�tests    r#rr's\���H����&���d�H�.�.�/��$��%��O�O�D�!��D�z�����%�
&��E�Lr%c���ttjtjtj
du��}|j
|�}tj
�-tj
j|j��|js(|js|jstj�|j��stj|�}t!|j�dk(r|j"s|jdd}nNt!|j"�dk(r|js|j"dd}nd}tjs|dz
}|jD��cgc]\}}t%|�|f��}}}|j"D��cgc]\}}t%|�|f��}}}tj&||||���|Scc}}wcc}}w)z2Run tests from a unittest.TestSuite-derived class.N)�	verbosity�capture_outputrrzmultiple errors occurredz!; run in verbose mode for details)�stats)r
r�stdoutr�verbose�junit_xml_list�runr*�get_xml_element�testsRun�skippedr�
TestDidNotRun�
wasSuccessfulr	�
from_unittest�len�failures�str�TestFailedWithDetails)	r+�runner�resultr2�err�tc�exc_strrr>s	         r#rr3ss��
�S�Z�Z�'.���-4�-C�-C�4�-O�R�F��Z�Z��
�F����)����%�%�f�&<�&<�&>�?��?�?�6�>�>�&�-�-��#�#�#����!��'�'��/���v�}�}���"�6�?�?��-�-��"�1�%�C�
����
!�Q�
&�v�}�}��/�/�!�$�Q�'�C�,�C��?�?�C�+N�$N�C�8>�
�
�F���W�3�r�7�G�$�F��F�:@�/�/�J�;�2�w�S��W�g�&�J��J��+�+�C����O�O��M��G��Js�7G� GrB�runtests�returnc�X�|jr3ddlm}||j||j|j�\}}n	|�}d}|rt
j|_|xtd�x�
\|}||_yxtjd�x� \tj|�}||_y�$t|j�d|���d}||_y	ddl
}t||j�rtj |�}||_ytdt#|����d}||_y)Nr)�runtest_refleakF�z test runner returned None: rzUnknown test result type: )�hunt_refleak�refleakrI�	test_name�quietr�REFLEAK�stater	rrr<r�doctestr(�TestResults�from_doctest�typer2)rB�	test_funcrFrIrL�test_resultr2rQs        r#�regrtest_runnerrWOs#�����,�.�v�/?�/?��/7�/D�/D�/7�~�~� ?���� �k������}�}����
�Y�[��E� �F�L�#�
"�X�
 �
 �
"��+�+�K�8�E��F�L�#�
��V�-�-�.�.J�9�+�V�W��E��F�L��
��+�w�':�':�;�!�.�.�{�;��
�F�L�� :�4��;L�:M�N�O����F�Lr%c���|j}t||j�}tj|��t�d�rt
d|�d����fd�}	t|||�tj�t||j�tjrtdt_t|�dt!tj��d��t"j%tj�tjj'�tj(�y#tj�t||j�wxYw)N�	test_mainzModule z= defines test_main() which is no longer supported by regrtestc���t��S)N)r$)rs�r#rUz!_load_run_test.<locals>.test_func�s����H�%�%r%Tz	 created z uncollectable object(s))rMr�test_dir�	importlib�
import_module�hasattrrrWr�
gc_collectrr4�gc�garbage�environment_alteredrr=�
GC_GARBAGE�extend�clear�
reap_children)rBrFrM�module_namerUrs     @r#�_load_run_testrhys���� � �I�!�)�X�->�->�?�K��&�&�{�3�H��x��%��'�)��-=�>�?�	?�&�	3���	�8�4�	�����i��!1�!1�2�	�z�z�&*��#����9�S����_�,=�>0�1�	2�
	���"�*�*�%�
�
�
���������	�����i��!1�!1�2�s�
D*�*,E�display_failurec��dt_|j}|rd}|j}|j}	t�tj�t||j||��5t||�ddd�tjr|jC�|j�tjD|_yy#1swY�LxYw#tj$r5}|s|st|�d|��d��tj|_Yd}~yd}~wtj $r5}|s|st|�d|��d��tj"|_Yd}~yd}~wtj$$r}}d|�d�}|r|�d|��}t|t&j(d�	�tj*|_|j,|_|j.|_|j0|_Yd}~yd}~wtj2$r[}d|�d�}|r|�d|��}t|t&j(d�	�tj*|_|j0|_Yd}~yd}~wtj4$rtj6|_Yyt8$r"t�tj:|_Yy|s6t=j>�}td|�d
|��t&j(d�	�tj@|_YyxYw)NF)�pgoz skipped -- T)�flush�test z failedz -- �rrl� crashed -- )#rrbrkrNrMrr_rr4rh�ResourceDeniedrr�RESOURCE_DENIEDrPr�SkipTest�SKIPPEDr@rr�FAILEDrr>r2�
TestFailedr:�DID_NOT_RUN�KeyboardInterrupt�INTERRUPTED�	traceback�
format_exc�UNCAUGHT_EXC�set_env_changed�PASSED)rBrFrirkrNrM�exc�msgs        r#�_runtest_env_changed_excr��sm��#(�G��
�,�,�C�
����N�N�E�� � �I�0�������
#�I�$,�$4�$4�e��F�	-��6�8�,�	-�\�"�"���� �
�|�|���|�|����c	-�	-���!�!���S��Y�K�|�C�5�1��>��,�,����������S��Y�K�|�C�5�1��>��}�}������(�(�	��i�[��(����E��c�U�#�C�
�c��
�
�$�/��|�|����
�
��
��,�,����y�y����������i�[��(����E��c�U�#�C�
�c��
�
�$�/��|�|����y�y������ � ���(�(������
���(�(�������&�&�(�C��E�)��L���6��z�z��
/��)�)����sb�7C�,
C�9C�C
�	C�K9�#+D�K9�)+E�K9�/A3G'�'K9�=AI�+K9�'K9�)AK9c��|j}|j}|j}|�*tjrd}tj|d��nd}	t|�|�rdt_tj�}tj}tj}tj}	|	j}
d}	|t_|t_
||	_t!||d��|j"t$j&k7r|j)�}|t_|t_
|
|	_|�Xtjj+|�tjj-�n|t_t!|||��tj.}|r<ddlmcm}
|D�cgc]"}|
j7|�j9d���$c}|_|rtj<�dt_y#|t_|t_
|
|	_wxYwcc}w#|rtj<�dt_wxYw)NT)�exitF)rirzus-ascii)r4�output_on_failure�timeoutr�can_start_thread�faulthandler�dump_traceback_laterrr�io�StringIOrr3rr�orig_stderrr�rPrr}�getvalue�writerlr5�xml.etree.ElementTree�etree�ElementTree�tostring�decode�xml_data�cancel_dump_traceback_later)rBrFr4r�r��use_timeout�stream�orig_stdoutr�r�orig_print_warnings_stderr�output�xml_list�ET�xs               r#�_runtestr��s������G� �2�2�����G���/�@�@����)�)�'��=���/&��H���"�G�O��[�[�]�F��*�*�K��*�*�K�#�1�1�M�)6�)B�)B�&��F�
G�#��
�#��
�-3�
�)�(���5�Q��<�<�5�<�<�/�#�_�_�.�F�(��
�(��
�,F�
�)��!��
�
� � ��(��
�
� � �"�&�G�O�$�V�X�9@�[�
B��)�)���.�.�(0�2�#$� "�{�{�1�~�4�4�Z�@�2�F�O���4�4�6�!%����+)��
�(��
�,F�
�)��2����4�4�6�!%���s3�A+H&�AG?�BH&�.'H!�H&�?H�H&�&#I	rMc���tj�}t|�}|j}	t	||�tjj�tjj�tj�|z
|_|S#|s6tj�}td|�d|��tjd��tj|_Y��xYw)z�Run a single test.

    test_name -- the name of the test

    Returns a TestResult.

    If runtests.use_junit, xml_data is a list containing each generated
    testsuite element.
    rmroTrn)�time�perf_counterrrkr�ryrzrrrrr{rPr3rl�duration)rMrF�
start_timerBrkrs      r#�run_single_testr�$s����"�"�$�J�
�	�
"�F�
�,�,�C�*����"��J�J�����J�J�����'�'�)�J�6�F�O��M��*���&�&�(�C��E�)��L���6��z�z��
/��)�)���s�B�AC$)T)+r�r`r\r�rr�ryrr.r�test.supportr�filterrrBrrr	rFr
�save_envr�setupr�
testresultr
�utilsrrrrr�PROGRESS_MIN_TIMEr$rrrWrcrh�boolr�r�r�rJr%r#�<module>r�s����	��	�
�����)��0�0��,��'�A�A����
��8#�J�#�X�#�$�#�N�
�"�:�"��"�d�"�L6:�D$�Z�D$�8�D$�.2�D$�>B�D$�N<&�Z�<&�8�<&��<&�~�x��8��
�r%

Zerion Mini Shell 1.0