ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/unittest/__pycache__/suite.cpython-311.opt-2.pyc

�

�f�4���	ddlZddlmZddlmZdZd�ZGd�de��ZGd	�d
e��ZGd�de��Z	d
�Z
Gd�de��ZdS)�N�)�case)�utilTc�>�t||d���}|��dS)Nc��dS�N�r	��5/opt/alt/python311/lib64/python3.11/unittest/suite.py�<lambda>z!_call_if_exists.<locals>.<lambda>s���r
)�getattr)�parent�attr�funcs   r�_call_if_existsrs$���6�4���.�.�D��D�F�F�F�F�Fr
c�X�eZdZ	dZdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�ZdS)�
BaseTestSuiteTr	c�L�g|_d|_|�|��dS�Nr)�_tests�_removed_tests�addTests)�self�testss  r�__init__zBaseTestSuite.__init__s)���������
�
�e�����r
c�\�dtj|j���dt|���d�S)N�<z tests=�>)r�strclass�	__class__�list�rs r�__repr__zBaseTestSuite.__repr__s+���"&�-���"?�"?�"?�"?��d�����L�Lr
c�z�t||j��stSt|��t|��kSr)�
isinstancer �NotImplementedr!)r�others  r�__eq__zBaseTestSuite.__eq__s3���%���0�0�	"�!�!��D�z�z�T�%�[�[�(�(r
c�*�t|j��Sr)�iterrr"s r�__iter__zBaseTestSuite.__iter__"s���D�K� � � r
c�P�|j}|D]}|r||���z
}�|Sr)r�countTestCases)r�cases�tests   rr-zBaseTestSuite.countTestCases%s=���#���	/�	/�D��
/���,�,�.�.�.����r
c�@�t|��s/td�t|�������t	|t
��r0t
|tjtf��rtd���|j
�|��dS)Nz{} is not callablezNTestCases and TestSuites must be instantiated before passing them to addTest())�callable�	TypeError�format�reprr%�type�
issubclassr�TestCase�	TestSuiter�append�rr/s  r�addTestzBaseTestSuite.addTest,s�����~�~�	E��0�7�7��T�
�
�C�C�D�D�D��d�D�!�!�	@�j��26�-��1K�'M�'M�	@��?�@�@�
@�����4� � � � � r
c��t|t��rtd���|D]}|�|���dS)Nz0tests must be an iterable of tests, not a string)r%�strr2r;)rrr/s   rrzBaseTestSuite.addTests6sR���e�S�!�!�	P��N�O�O�O��	�	�D��L�L������	�	r
c��t|��D]5\}}|jrn(||��|jr|�|���6|Sr)�	enumerate�
shouldStop�_cleanup�_removeTestAtIndex)r�result�indexr/s    r�runzBaseTestSuite.run<s\��$�T�?�?�	/�	/�K�E�4�� �
����D��L�L�L��}�
/��'�'��.�.�.���
r
c��		|j|}t|d��r"|xj|���z
c_d|j|<dS#t$rYdSwxYw)Nr-)r�hasattrrr-r2)rrDr/s   rrBz BaseTestSuite._removeTestAtIndexEs���@�
	&��;�u�%�D��t�-�.�.�
=��#�#�t�':�':�'<�'<�<�#�#�!%�D�K�������	�	�	��D�D�	���s�
A�
A�Ac��|j|i|��Sr�rE)r�args�kwdss   r�__call__zBaseTestSuite.__call__Ss���t�x��&��&�&�&r
c�:�	|D]}|����dSr)�debugr:s  rrNzBaseTestSuite.debugVs-��E��	�	�D��J�J�L�L�L�L�	�	r
N)r	)�__name__�
__module__�__qualname__rArr#r(r+r-r;rrErBrLrNr	r
rrrs���������H�����
M�M�M�)�)�)�
!�!�!����!�!�!�������&�&�&�'�'�'�����r
rc�P�eZdZ	dd�Zd�Zd�Zd�Zd�Z	d
d�Z	d
d	�Z	d
�Z
d�ZdS)r8Fc�l�d}t|dd��dur	dx|_}t|��D]�\}}|jrn�t	|��rv|�||��|�||��|�||��|j|_	t|jdd��st|dd��r��|s||��n|�
��|jr|�|����|r2|�d|��|�
|��d|_|S)NF�_testRunEnteredT�_classSetupFailed�_moduleSetUpFailed)r
rTr?r@�_isnotsuite�_tearDownPreviousClass�_handleModuleFixture�_handleClassSetUpr �_previousTestClassrNrArB�_handleModuleTearDown)rrCrN�topLevelrDr/s      rrEz
TestSuite.runfsb�����6�,�e�4�4��=�=�04�4�F�"�X�$�T�?�?�	/�	/�K�E�4�� �
����4� � �
��+�+�D�&�9�9�9��)�)�$��7�7�7��&�&�t�V�4�4�4�,0�N��)��D�N�,?��G�G���F�$8�%�@�@����
���V������
�
�����}�
/��'�'��.�.�.���	+��'�'��f�5�5�5��&�&�v�.�.�.�%*�F�"��
r
c�P�	t��}|�|d��dS)NT)�_DebugResultrE)rrNs  rrNzTestSuite.debug�s(��E��������������r
c���t|dd��}|j}||krdS|jrdSt|dd��rdSd}	d|_n#t$rYnwxYwt|dd��}t|dd��}|��t|d��		|��nt#t$rg}t|t��r�d}	d|_n#t$rYnwxYwtj
|��}	|�||d|	��Yd}~nd}~wwxYw|r6|�4|��|jD]"}
|�||
dd|	|
�	���#t|d
��dS#t|d
��wxYwdS)Nr[�__unittest_skip__F�
setUpClass�doClassCleanups�_setupStdoutTr��info�_restoreStdout)
r
r rVrUr2r�	Exceptionr%r_rr�"_createClassOrModuleLevelException�tearDown_exceptions)rr/rC�
previousClass�currentClass�failedrbrc�e�	className�exc_infos           rrZzTestSuite._handleClassSetUp�s8����(<�d�C�C�
��~���=�(�(��F��$�	��F��<�!4�e�<�<�	��F���	�-2�L�*�*���	�	�	�
�D�	����
�\�<��>�>�
�!�,�0A�4�H�H���!��F�N�3�3�3�
:�
G��J�L�L�L�L�� �G�G�G�!�&�,�7�7���!�F��9=��6�6��$���������� $�
�l� ;� ;�I��;�;�F�A�<H�<E�G�G�G�G�G�G�G�G�����G�����/�o�9�#�O�%�%�%�$0�$D�/�/���?�?� &����\�9�%-�@�/�/�/�/� ��(8�9�9�9�9�9����(8�9�9�9�9����1"�!sf�A�
A�A�
B�E�
D
�#D�<C�D�
C�D�C�/D�E�D
�
;E�E)c�>�d}t|dd��}|�|j}|S)Nr[)r
rP)rrC�previousModulerks    r�_get_previous_modulezTestSuite._get_previous_module�s-������(<�d�C�C�
��$�*�5�N��r
c��|�|��}|jj}||krdS|�|��d|_	t
j|}n#t$rYdSwxYwt|dd��}|��t|d��		|��nL#t$r?}t|t��r�d|_|�
||d|��Yd}~nd}~wwxYw|jrD	tj��n/#t$r"}|�
||d|��Yd}~nd}~wwxYwt|d��dS#t|d��wxYwdS)NF�setUpModulerdTrg)rsr rPr\rV�sys�modules�KeyErrorr
rrhr%r_rir�doModuleCleanups)rr/rCrr�
currentModule�modulerurns        rrYzTestSuite._handleModuleFixture�s���2�2�6�:�:����1�
��N�*�*��F��"�"�6�*�*�*�%*��!�	��[��/�F�F���	�	�	��F�F�	�����f�m�T�:�:���"��F�N�3�3�3�
:�K��K�M�M�M�M�� �K�K�K�!�&�,�7�7���04�F�-��;�;�F�A�<I�<I�K�K�K�K�K�K�K�K�����	K�����,�O�O��-�/�/�/�/��$�O�O�O��?�?���@M�@M�O�O�O�O�O�O�O�O�����O����
 ��(8�9�9�9�9�9����(8�9�9�9�9����)#�"sl�A�
A(�'A(�
B�E�
C$�%5C�E�C$�$
E�/D�E�
D/�
D*�%E�*D/�/E�ENc�F�|�d|�d�}|�||||��dS)Nz (�))�_addClassOrModuleLevelException)rrC�exc�method_namerrf�	errorNames       rriz,TestSuite._createClassOrModuleLevelException�s8��"�/�/�f�/�/�/�	��,�,�V�S�)�T�J�J�J�J�Jr
c�6�t|��}t|dd��}|�5t|tj��r||t|����dS|s)|�|tj����dS|�||��dS)N�addSkip)	�_ErrorHolderr
r%r�SkipTestr=�addErrorrvrp)rrC�	exceptionr�rf�errorr�s       rr~z)TestSuite._addClassOrModuleLevelException�s����Y�'�'���&�)�T�2�2����:�i���#G�#G���G�E�3�y�>�>�*�*�*�*�*��
-�����s�|�~�~�6�6�6�6�6�����t�,�,�,�,�,r
c�|�|�|��}|�dS|jrdS	tj|}n#t$rYdSwxYwt|d��	t
|dd��}|�Q	|��nE#t$r8}t|t��r�|�
||d|��Yd}~nd}~wwxYw	tj��nE#t$r8}t|t��r�|�
||d|��Yd}~nd}~wwxYwt|d��dS#t|d��wxYw)Nrd�tearDownModulerg)
rsrVrvrwrxrr
rhr%r_rirry)rrCrrr{r�rns      rr\zTestSuite._handleModuleTearDown�s����2�2�6�:�:���!��F��$�	��F�	��[��0�F�F���	�	�	��F�F�	����	���/�/�/�	6�$�V�-=�t�D�D�N��)�L�"�N�$�$�$�$�� �L�L�L�!�&�,�7�7����;�;�F�A�<L�<J�L�L�L�L�L�L�L�L�����L����
H��%�'�'�'�'���
H�
H�
H��f�l�3�3����7�7���8H�8F�H�H�H�H�H�H�H�H�����
H����
�F�$4�5�5�5�5�5��O�F�$4�5�5�5�5���so�7�
A�A�D)�-
A8�7D)�8
B:�.B5�0D)�5B:�:D)�>C�D)�
D�.D�
D)�D�D)�)D;c��t|dd��}|j}||ks|�dSt|dd��rdSt|dd��rdSt|dd��rdSt|dd��}t|dd��}|�|�dSt|d��	|�e	|��nY#t$rL}t	|t
��r�t
j|��}|�||d|��Yd}~nd}~wwxYw|�e|��|j	D]S}	t	|t
��r|	d	�t
j|��}|�||	d	d||	�
���Tt|d��dS#t|d��wxYw)Nr[rUFrVra�
tearDownClassrcrdrrerg)
r
r rrhr%r_rrrirj)
rr/rCrkrlr�rcrnrorps
          rrXz TestSuite._tearDownPreviousClasss%����(<�d�C�C�
��~���=�(�(�M�,A��F��=�"5�u�=�=�	��F��6�/��7�7�	��F��=�"5�u�=�=�	��F��
���E�E�
�!�-�1B�D�I�I��� �_�%<��F����/�/�/�	6��(�G�!�M�O�O�O�O�� �G�G�G�!�&�,�7�7��� $�
�m� <� <�I��;�;�F�A�<K�<E�G�G�G�G�G�G�G�G�����	G�����*���!�!�!� -� A�K�K�H�!�&�,�7�7�*�&�q�k�)� $�
�m� <� <�I��;�;�F�H�Q�K�<K�<E�AI�<�K�K�K�K�

�F�$4�5�5�5�5�5��O�F�$4�5�5�5�5���s8�E5�
B#�"E5�#
C9�-AC4�/E5�4C9�9A*E5�5F)Fr)rOrPrQrErNrZrsrYrir~r\rXr	r
rr8r8\s������������B���,:�,:�,:�\���#:�#:�#:�L9=�K�K�K�K�.2�
-�
-�
-�
-�!6�!6�!6�F(6�(6�(6�(6�(6r
r8c�D�eZdZ	dZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZdS)
r�Nc��||_dSr��description)rr�s  rrz_ErrorHolder.__init__Ts��&����r
c��|jSrr�r"s r�idz_ErrorHolder.idWs����r
c��dSrr	r"s r�shortDescriptionz_ErrorHolder.shortDescriptionZs���tr
c��d|j�d�S)Nz<ErrorHolder description=rr�r"s rr#z_ErrorHolder.__repr__]s���15�1A�1A�1A�C�Cr
c�*�|���Sr)r�r"s r�__str__z_ErrorHolder.__str__`s���w�w�y�y�r
c��dSrr	�rrCs  rrEz_ErrorHolder.runcs	��	
�r
c�,�|�|��SrrIr�s  rrLz_ErrorHolder.__call__hs���x�x����r
c��dSrr	r"s rr-z_ErrorHolder.countTestCasesks���qr
)rOrPrQ�failureExceptionrr�r�r#r�rErLr-r	r
rr�r�Hs����������'�'�'� � � ����D�D�D����
�
�
�
 � � �����r
r�c�L�		t|��n#t$rYdSwxYwdS)NTF)r*r2)r/s rrWrWns>��E���T�
�
�
�
�������t�t������5s��
!�!c��eZdZ	dZdZdZdS)r_NF)rOrPrQr[rVr@r	r
rr_r_ws"������I������J�J�Jr
r_)rv�rr�
__unittestr�objectrr8r�rWr_r	r
r�<module>r�s���
�
�
�
�������������
�
����
I�I�I�I�I�F�I�I�I�Xi6�i6�i6�i6�i6�
�i6�i6�i6�X$�$�$�$�$�6�$�$�$�L��������6�����r

Zerion Mini Shell 1.0