%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__/results.cpython-312.pyc

�

3�+g�#��|�ddlZddlmZddlmZmZmZddlmZm	Z	m
Z
mZmZm
Z
mZmZdZdZdZd	Zd
ZGd�d�Zy)
�N�)�RunTests)�State�
TestResult�	TestStats)�StrPath�TestName�	TestTuple�TestList�
FilterDict�	printlist�count�format_duration�����c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zde	de
fd	�Zd
�Zdd�d
e
deeeffd�Zdeefd�Zdefd�Zdede
de
fd�Zde
de
fd�Zy)�TestResultsc���g|_g|_g|_g|_g|_g|_g|_g|_g|_d|_	d|_
g|_t�|_
g|_y)NF)�bad�good�	rerun_bad�skipped�resource_denied�env_changed�run_no_tests�rerun�
rerun_results�interrupted�
worker_bug�
test_timesr�stats�
testsuite_xml��selfs �//usr/lib/python3.12/test/libregrtest/results.py�__init__zTestResults.__init__sl����� ��	�#%���!#���)+���%'���&(���!��
�/1���!&��� %���8:����[��
�#%���c�v�|jxr+|jxr|jxr
|jS�N)rrr!r"r&s r(�is_all_goodzTestResults.is_all_good&sA���H�H��(����$�(��(�(�(�(����'�	)r*c��t|j�t|j�zt|j�zt|j�zt|j
�zt|j�zSr,)�setrrrrrrr&s r(�get_executedzTestResults.get_executed,sg���D�I�I���T�X�X��.��T�\�\�1B�B��d�*�*�+�,�.1�$�2B�2B�.C�D��d�'�'�(�)�	*r*c��t|j|j|j|j|j
f�Sr,)�anyrrrr!rr&s r(�no_tests_runzTestResults.no_tests_run1s<����	�	�4�8�8�T�\�\�4�;K�;K��(�(�*�+�+�	+r*c��g}|jr|jd�nA|r|jr|jd�n!|j�r|jd�|jr|jd�|j
r|jd�|s|jd�dj
|�S)N�FAILUREzENV CHANGEDzNO TESTS RAN�INTERRUPTEDz
WORKER BUG�SUCCESSz, )r�appendrr3r!r"�join)r'�fail_env_changed�states   r(�	get_statezTestResults.get_state5s������8�8��L�L��#�
�$�"2�"2��L�L��'�
�
�
�
 ��L�L��(�����L�L��'��?�?��L�L��&���L�L��#��y�y���r*c��d}|jrt}|S|jrt}|S|r|jrt
}|S|j
�rt}|S|r|jrt}|S|jrt}|S)Nr)r�EXITCODE_BAD_TESTr!�EXITCODE_INTERRUPTEDr�EXITCODE_ENV_CHANGEDr3�EXITCODE_NO_TESTS_RANr�EXITCODE_RERUN_FAILr")r'r:�
fail_rerun�exitcodes    r(�get_exitcodezTestResults.get_exitcodeGs������8�8�(�H����
�
�+�H����$�"2�"2�+�H���
�
�
�
 �,�H�
��	�D�J�J�*�H����_�_�(�H��r*�result�runtestsc�6�|j}|j}|j}|jxtj
k(r|jj|��nWxtjk(r9|jj|�|jj|��nxtjk(r|jj|�n�xtjk(r|jj|�n�xtjk(r	d|_n�tj"k(r|j$j|�na	|j'|�r7|j(j|�|jj|�nt+d|j����|jtj,k(rd|_|j1�r@|s>|j2�t+d��|j4j|j2|f�|j6�%|j6j9|j6�|r|jj|�|j:}|r|j=|�yy)NTzinvalid test state: zresult.duration is None)�	test_namerr:r;r�PASSEDrr8�ENV_CHANGEDrr �SKIPPEDr�RESOURCE_DENIEDrr6r!�DID_NOT_RUNr�	is_failedr�
ValueError�
WORKER_BUGr"�has_meaningful_duration�durationr#r$�
accumulate�xml_data�	add_junit)r'rFrGrIrr:rUs       r(�accumulate_resultzTestResults.accumulate_resultWs����$�$�	�����#�4�4���l�l������	�	� � ��+�"��"�"�� � �'�'�	�2��"�"�)�)�&�1��������#�#�I�.�&��&�&��$�$�+�+�I�6�"��"�"�#'�� ��"�"��!�!�(�(��3���#�#�$4�5��H�H�O�O�I�.��&�&�-�-�f�5�$�';�F�L�L�;K�%L�M�M��<�<�5�+�+�+�"�D�O��)�)�+�E����&� �!:�;�;��O�O�"�"�F�O�O�Y�#?�@��<�<�#��J�J�!�!�&�,�,�/���J�J���i�(��?�?����N�N�8�$�r*c�,�t|j�Sr,)�boolr r&s r(�
need_rerunzTestResults.need_rerun�s���D�&�&�'�'r*T)�clearr[�returnc��g}i}|jD]?}|j|j�|j�}|s�1|||j<�A|rs|jj|j�|jj�|jj�|jj�t|�|fSr,)
r r8rI�get_rerun_match_testsr�extendrr[r�tuple)r'r[�tests�match_tests_dictrF�match_testss      r(�
prepare_rerunzTestResults.prepare_rerun�s��������(�(�	A�F��L�L��)�)�*� �6�6�8�K��5@� ��!1�!1�2�
	A���N�N�!�!�$�(�(�+��H�H�N�N�����"�"�$����$�$�&��e��.�/�/r*rUc���ddlmcm}|D]-}	|jj	|j|���/y#|j$rt|tj���wxYw)Nr)�file)
�xml.etree.ElementTree�etree�ElementTreer%r8�
fromstring�
ParseError�print�sys�
__stderr__)r'rU�ET�es    r(rVzTestResults.add_junit�s_��*�*��	�A�
��"�"�)�)�"�-�-��*:�;�	���=�=�
��h�S�^�^�4��
�s	�*=�,A)�filenamec��|jsyddlmcm}|j	d�}dddd�}|jD]A}|j|�|D])}	||xxt
|j|d��z
cc<�+�C|j�D] \}}|j|t|���"t|d�5}|j|�D]}	|j|	��	ddd�y#t$rY��wxYw#1swYyxYw)Nr�
testsuites)ra�errors�failures�wb)r%rgrhri�Elementr8�int�getrP�itemsr/�str�open�tostringlist�write)
r'rqro�root�totals�suite�k�v�f�ss
          r(�write_junitzTestResults.write_junit�s���!�!��*�*��z�z�,�'����q�9���'�'�	�E��K�K����
����1�I��U�Y�Y�q�!�_�!5�5�I�
�	��L�L�N�	 �D�A�q��H�H�Q��A���	 ��(�D�
!�	�Q��_�_�T�*�
������
�
�	�	��
"�����	�	�s�&C/�=(C>�/	C;�:C;�>Dra�quiet�
print_slowestc	�l�|rb|jjd��t�td�|jddD]\}}td|�dt|�����!g}t	|�|j�z
}|j
|ddf�|s<|j
|jdd	f�|j
|jdd
f�|j
|jddf�|j
|jddf�|j
|jd
df�|j
|jddf�|D]M\}}	}
|s�
t�tt|�|	�}	t|
j|	��t!|��O|j"rh|sft�tt|j"�d�}|�d�}|j%�rt|j"�dkDrd|��}t|�|j&rt�td�yy)NT)�reversez10 slowest tests:�
z- z: �testz{} omitted:z{} skipped:z{} skipped (resource denied):z{} run no tests:z3{} altered the execution environment (env changed):zre-run testz{}:z
{} failed:z OK.rzAll z(Test suite interrupted by signal SIGINT.)r#�sortrlrr/r0r8rrrrrrr�len�formatr
rr-r!)r'rar�r��	test_timer��	all_tests�omitted�
tests_list�
count_text�title_format�texts            r(�display_resultzTestResults.display_result�s�����O�O� � �� �.��G��%�&�#'�?�?�3�B�#7�
G��	�4��D�/�)�*D�E�F�
G��	��e�*�t�0�0�2�2��	���'�6�=�9�:�����d�l�l�F�M�B�C����d�2�2�F�<[�\�]����$�+�+�V�5G�H�I�	���$�*�*�F�4i�j�k����$�*�*�m�U�;�<����$�(�(�F�L�9�:�4=�	&�0�J�
�L����"�3�z�?�J�?�
��l�)�)�*�5�6��*�%�	&��9�9�U��G���T�Y�Y���0�D��V�4�=�D�� � �"�s�4�9�9�~��'9��d�V�}���$�K�����G��<�=�r*�first_runtests�filteredc��|j}d|jd��}|r|�d�}|g}|jr|jd|jd���|jr|jd|jd���tddj
|����|j|j|j|j|j|jg}ttt|��}d|��}|jst|j �}|�d|��}|r|�d�}|g}d	|jfd
|jfd|jfd|j"fd
|jfd|jffD]'\}	}
|
s�	|j|	�dt|
�����)tddj
|����y)Nzrun=�,z (filtered)z	failures=zskipped=z
Total tests: � �/�failedrrrrr�=zTotal test files: )r$�	tests_runrur8rrlr9rrrrr�sum�mapr��foreverrar)r'r�r�r$r��reportr��run�ntest�nameras           r(�display_summaryzTestResults.display_summary�s����
�
���e�o�o�a�(�)����V�;�'�D�����>�>��M�M�I�e�n�n�Q�%7�8�9��=�=��M�M�H�U�]�]�1�$5�6�7�
�
�c�h�h�v�.�/�0�1��Y�Y����$�*�*��\�\��%�%�t�'8�'8�:�	��#�c�9�%�&���c�U�|���%�%���,�,�-�E��V�1�U�G�$�D���V�;�'�D����
�t�x�x� �
�D�,�,�-�
����%�
�� 4� 4�5�
�d�j�j�!�
�T�.�.�/�

�		6�K�D�%���
�
���a��E�
�|�4�5�		6�	�"�3�8�8�F�#3�"4�5�6r*N)�__name__�
__module__�__qualname__r)r-r0r3r<rErrrWrZrYr`r
rrd�listr{rVrr�r�r��r*r(rrs���&�$)�*�
+� �$� (%�
�(%�h�(%�T(�.2�0�d�0�e�I�z�<Q�6R�0�(�$�s�)���G��2(>�I�(>�d�(>�4�(>�T#7�h�#7�$�#7r*r)rmrGrrFrrr�utilsrr	r
rrr
rrr>r@rArBr?rr�r*r(�<module>r�sL��
��0�0�'�'�'�����������t7�t7r*

Zerion Mini Shell 1.0