403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib/python3.11/site-packages/ansible/utils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.11/site-packages/ansible/utils/__pycache__/_junit_xml.cpython-311.pyc
�

���cG!���dZddlmZddlZddlZddlZddlZddlmZddl	m
ZejGd�dej
�����ZejGd	�d
e����ZejGd�de����ZejGd
�d����ZejGd�d����ZejGd�d����Zdd�Zdd�ZdS)z�
Dataclasses for creating JUnit XML files.
See: https://github.com/junit-team/junit5/blob/main/platform-tests/src/test/resources/jenkins-junit.xsd
�)�annotationsN)�minidom)�ElementTreec��eZdZUdZdZded<dZded<dZded<d�Ze	e
jdd
�����Zdd�Z
dd�ZdS)�
TestResultz)Base class for the result of a test case.N�
str | None�output�message�typec�0�|j�|j|_dSdS�N)r�tag��selfs �=/usr/lib/python3.11/site-packages/ansible/utils/_junit_xml.py�
__post_init__zTestResult.__post_init__s���9����D�I�I�I����return�strc��dS)�9Tag name for the XML element created by this result type.N�rs rrzTestResult.tags���r�dict[str, str]c�8�t|j|j���S)�4Return a dictionary of attributes for this instance.)r
r)�_attributesr
rrs r�get_attributeszTestResult.get_attributes!s#����L���
�
�
�	
r�
ET.Elementc�v�tj|j|�����}|j|_|S)�1Return an XML element representing this instance.)�ET�Elementrrr	�text�r�elements  r�get_xml_elementzTestResult.get_xml_element(s/���*�T�X�t�':�':�'<�'<�=�=���{����r�rr�rr�rr)�__name__�
__module__�__qualname__�__doc__r	�__annotations__r
rr�property�abc�abstractmethodrrr&rrrrrs��������3�3��F������G������D�����!�!�!����H�H�H����X�H�
�
�
�
������rr)�	metaclassc�*�eZdZdZedd���ZdS)�TestFailurezFailure info for a test case.rrc��dS)r�failurerrs rrzTestFailure.tag3s	���yrNr'�r*r+r,r-r/rrrrr4r40s8������'�'�
�����X���rr4c�*�eZdZdZedd���ZdS)�	TestErrorzError info for a test case.rrc��dS)r�errorrrs rrz
TestError.tag<s	���wrNr'r7rrrr9r99s8������%�%�
�����X���rr9c�>�eZdZUdZded<dZded<dZded<dZded	<dZd
ed<e	j
e���Zd
ed<e	j
e���Z
ded<dZded<dZded<dZded<dZded<edd���Zedd���Zedd���Zd d�Zd!d�ZdS)"�TestCasezAn individual test case.r�nameNz
int | None�
assertionsr�	classname�statuszdecimal.Decimal | None�time��default_factoryzlist[TestError]�errorszlist[TestFailure]�failures�skipped�
system_out�
system_errF�bool�is_disabledrc�*�t|j��S)z,True if the test case contains failure info.)rJrFrs r�
is_failurezTestCase.is_failureSs���D�M�"�"�"rc�*�t|j��S)z*True if the test case contains error info.)rJrErs r�is_errorzTestCase.is_errorXs���D�K� � � rc�*�t|j��S)z"True if the test case was skipped.)rJrGrs r�
is_skippedzTestCase.is_skipped]s���D�L�!�!�!rrc�\�t|j|j|j|j|j���S)r)r?r@r>rArB)rr?r@r>rArBrs rrzTestCase.get_attributesbs2������n����;���
�
�
�	
rrc���tjd|�����}|jr|jtj|d��_|�d�|jD����|�d�|jD����|j	r|j	tj|d��_|j
r|j
tj|d��_|S)r �testcaserGc�6�g|]}|�����Sr�r&)�.0r;s  r�
<listcomp>z,TestCase.get_xml_element.<locals>.<listcomp>s�$��I�I�I�E��-�-�/�/�I�I�Irc�6�g|]}|�����SrrV)rWr6s  rrXz,TestCase.get_xml_element.<locals>.<listcomp>ts$��O�O�O�g��/�/�1�1�O�O�Or�
system-out�
system-err)r!r"rrG�
SubElementr#�extendrErFrHrIr$s  rr&zTestCase.get_xml_elementls����*�Z��)<�)<�)>�)>�?�?���<�	B�59�\�B�M�'�9�-�-�2����I�I�T�[�I�I�I�J�J�J����O�O���O�O�O�P�P�P��?�	H�8<��B�M�'�<�0�0�5��?�	H�8<��B�M�'�<�0�0�5��r)rrJr(r))r*r+r,r-r.r?r@rArB�dataclasses�field�listrErFrGrHrIrKr/rMrOrQrr&rrrr=r=Bsu�������"�"�
�I�I�I�!�J�!�!�!�!� �I� � � � ��F�����#'�D�'�'�'�'�/�k�/��E�E�E�F�E�E�E�E�"3�+�"3�D�"I�"I�"I�H�I�I�I�I��G�����!�J�!�!�!�!�!�J�!�!�!�!��K�����
�#�#�#��X�#��!�!�!��X�!��"�"�"��X�"�
�
�
�
������rr=c�j�eZdZUdZded<dZded<dZded<dZded<dZd	ed
<e	j
e���Zded
<e	j
e
���Zded<dZded<dZded<edd���Zedd���Zedd���Zedd���Zedd���Zedd���Zd d�Zd!d�ZdS)"�	TestSuitezA collection of test cases.rr>Nr�hostname�id�packagezdatetime.datetime | None�	timestamprCr�
propertieszlist[TestCase]�casesrHrIr�intc�>�td�|jD����S)�"The number of disabled test cases.c3�$K�|]}|jV��dSr
)rK�rW�cases  r�	<genexpr>z%TestSuite.disabled.<locals>.<genexpr>�s%����;�;��4�#�;�;�;�;�;�;r��sumrirs r�disabledzTestSuite.disabled�s#���;�;��
�;�;�;�;�;�;rc�>�td�|jD����S)�/The number of test cases containing error info.c3�$K�|]}|jV��dSr
)rOrns  rrpz#TestSuite.errors.<locals>.<genexpr>�s$����8�8�T�4�=�8�8�8�8�8�8rrqrs rrEzTestSuite.errors�s#���8�8�T�Z�8�8�8�8�8�8rc�>�td�|jD����S)�1The number of test cases containing failure info.c3�$K�|]}|jV��dSr
)rMrns  rrpz%TestSuite.failures.<locals>.<genexpr>��$����:�:�t�4�?�:�:�:�:�:�:rrqrs rrFzTestSuite.failures��#���:�:�t�z�:�:�:�:�:�:rc�>�td�|jD����S)z1The number of test cases containing skipped info.c3�$K�|]}|jV��dSr
)rQrns  rrpz$TestSuite.skipped.<locals>.<genexpr>�rzrrqrs rrGzTestSuite.skipped�r{rc�*�t|j��S)�The number of test cases.)�lenrirs r�testszTestSuite.tests�s���4�:���r�decimal.Decimalc�b�tjtd�|jD������S)�#The total time from all test cases.c3�2K�|]}|j�	|jV��dSr
�rBrns  rrpz!TestSuite.time.<locals>.<genexpr>�s+����"Q�"Q��t�y�"Q�4�9�"Q�"Q�"Q�"Q�"Q�"Qr)�decimal�Decimalrrrirs rrBzTestSuite.time�s-����s�"Q�"Q���"Q�"Q�"Q�Q�Q�R�R�Rrc���t|j|j|j|j|j|j|j|j|j	|j
|jr|j�d���nd���S)r�seconds)�timespecN)rsrErFrdrer>rfrGr�rBrg)
rrsrErFrdrer>rfrGr�rBrg�	isoformatrs rrzTestSuite.get_attributes�sn����]��;��]��]��w����L��L��*���FJ�n�^�d�n�.�.�	�.�B�B�B�Z^�
�
�
�	
rrc���tjd|�����}|jrItj|d���d�|j���D����|�d�|jD����|jr|jtj|d��_	|j
r|j
tj|d��_	|S)r �	testsuiterhc	�\�g|])\}}tjdt||�������*S)r/)r>�value)r!r"�dict)rWr>r�s   rrXz-TestSuite.get_xml_element.<locals>.<listcomp>�sM��9Z�9Z�9Z�r}�rv�x}���J�PT�Z^�fk�Pl�Pl�Pl�9m�9m�9Z�9Z�9Zrc�6�g|]}|�����SrrV)rW�	test_cases  rrXz-TestSuite.get_xml_element.<locals>.<listcomp>�s$��P�P�P�	�	�1�1�3�3�P�P�Prr[r\)r!r"rrhr]r^�itemsrirHr#rIr$s  rr&zTestSuite.get_xml_element�s���*�[�$�*=�*=�*?�*?�@�@���?�	[��M�'�<�0�0�7�7�9Z�9Z�BF�BQ�BW�BW�BY�BY�9Z�9Z�9Z�
[�
[�
[����P�P�T�Z�P�P�P�Q�Q�Q��?�	H�8<��B�M�'�<�0�0�5��?�	H�8<��B�M�'�<�0�0�5��r�rrj�rr�r(r))r*r+r,r-r.rdrerfrgr_r`r�rhrarirHrIr/rsrErFrGr�rBrr&rrrrcrcs��������%�%�
�I�I�I��H������B������G�����*.�I�.�.�.�.�!2��!2�4�!H�!H�!H�J�H�H�H�H�-�K�-�d�C�C�C�E�C�C�C�C�!�J�!�!�!�!�!�J�!�!�!�!�
�<�<�<��X�<��9�9�9��X�9��;�;�;��X�;��;�;�;��X�;������X���S�S�S��X�S�
�
�
�
� �����rrcc���eZdZUdZdZded<eje���Z	ded<e
dd
���Ze
dd���Ze
dd���Z
e
dd
���Ze
dd���Zdd�Zdd�Zdd�ZdS)�
TestSuiteszA collection of test suites.Nrr>rCzlist[TestSuite]�suitesrrjc�>�td�|jD����S)rlc3�$K�|]}|jV��dSr
)rs�rW�suites  rrpz&TestSuites.disabled.<locals>.<genexpr>��$����;�;�e�5�>�;�;�;�;�;�;r�rrr�rs rrszTestSuites.disabled��#���;�;�t�{�;�;�;�;�;�;rc�>�td�|jD����S)ruc3�$K�|]}|jV��dSr
)rEr�s  rrpz$TestSuites.errors.<locals>.<genexpr>�s$����9�9�E�5�<�9�9�9�9�9�9rr�rs rrEzTestSuites.errors�s#���9�9�T�[�9�9�9�9�9�9rc�>�td�|jD����S)rxc3�$K�|]}|jV��dSr
)rFr�s  rrpz&TestSuites.failures.<locals>.<genexpr>�r�rr�rs rrFzTestSuites.failures�r�rc�>�td�|jD����S)rc3�$K�|]}|jV��dSr
)r�r�s  rrpz#TestSuites.tests.<locals>.<genexpr>�s$����8�8�5�5�;�8�8�8�8�8�8rr�rs rr�zTestSuites.tests�s#���8�8�D�K�8�8�8�8�8�8rr�c�b�tjtd�|jD������S)r�c3�$K�|]}|jV��dSr
r�r�s  rrpz"TestSuites.time.<locals>.<genexpr>�s$����"G�"G�%�5�:�"G�"G�"G�"G�"G�"Gr)r�r�rrr�rs rrBzTestSuites.time�s-����s�"G�"G�4�;�"G�"G�"G�G�G�H�H�Hrrc�h�t|j|j|j|j|j|j���S)r)rsrErFr>r�rB)rrsrErFr>r�rBrs rrzTestSuites.get_attributes�s7����]��;��]����*���

�
�
�	
rrc��tjd|�����}|�d�|jD����|S)r �
testsuitesc�6�g|]}|�����SrrVr�s  rrXz.TestSuites.get_xml_element.<locals>.<listcomp>�rYr)r!r"rr^r�r$s  rr&zTestSuites.get_xml_element�sG���*�\�4�+>�+>�+@�+@�A�A�����I�I�T�[�I�I�I�J�J�J��rrc�D�t|�����S)z@Return a pretty formatted XML string representing this instance.)�_pretty_xmlr&rs r�
to_pretty_xmlzTestSuites.to_pretty_xml�s���4�/�/�1�1�2�2�2rr�r�r(r)r')r*r+r,r-r>r.r_r`rar�r/rsrErFr�rBrr&r�rrrr�r��s,�������&�&��D�����/�k�/��E�E�E�F�E�E�E�E�
�<�<�<��X�<��:�:�:��X�:��<�<�<��X�<��9�9�9��X�9��I�I�I��X�I�	
�	
�	
�	
�����3�3�3�3�3�3rr�rrc�>�d�|���D��S)zuReturn the given kwargs as a dictionary with values converted to strings. Items with a value of None will be omitted.c�8�i|]\}}|�|t|����Sr
)r)rW�keyr�s   r�
<dictcomp>z_attributes.<locals>.<dictcomp>s)��R�R�R�
��U��@Q�C��U���@Q�@Q�@Qr)r�)�kwargss rrrs��R�R�f�l�l�n�n�R�R�R�Rrr%rrc�v�tjtj|d��������S)zDReturn a pretty formatted XML string representing the given element.�unicode)�encoding)r�parseStringr!�tostring�toprettyxml)r%s rr�r�	s.����r�{�7�Y�G�G�G�H�H�T�T�V�V�Vrr()r%rrr)r-�
__future__rr0r_�datetimer��xml.domr�	xml.etreerr!�	dataclass�ABCMetarr4r9r=rcr�rr�rrr�<module>r�s����#�"�"�"�"�"�
�
�
�
�������������������'�'�'�'�'�'�
�������3�;�������<
�������*������
�������
������
��9�9�9�9�9�9�9���9�x
��J�J�J�J�J�J�J���J�Z
��33�33�33�33�33�33�33���33�lS�S�S�S�
W�W�W�W�W�Wr

Youez - 2016 - github.com/yon3zu
LinuXploit