%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/trial/test/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/trial/test/__pycache__/test_output.cpython-312.pyc

�

Ϫ�f���dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ed	�Zd
Zdd�ZGd�d
e
j"�Zy)z*
Tests for the output generated by trial.
�)�annotationsN)�StringIO)�TypeVar)�trial)�runner)�packages�_TzNo module named 'frotz'c�"�ddlm}tj�}|j	|�t�}t
j|j||d��}tj|�}|j|�|j�S)Nr)�reporterztemp-directory)�stream�workingDirectory)�
twisted.trialrr�Options�parseOptionsrr�TrialRunner�VerboseTextReporter�	_getSuite�run�getvalue)�argsr�config�output�myRunner�suites      �@/usr/lib/python3/dist-packages/twisted/trial/test/test_output.py�runTrialrss��&�
�]�]�_�F�
�����
�Z�F��!�!��$�$��� 0�1��H�

�O�O�F�#�E��L�L����?�?���c����eZdZdZdd�ZdZdd�Zdd�Z										d�fd�Z										d�fd�Z	dd�Z
dd	�Zdd
�Zdd�Z
dd�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z�xZS)�ImportErrorsTestszbActually run trial as if on the command line and check that the output
    is what we expect.
    c��y�N���selfs r�debugzImportErrorsTests.debug+s��r�_testImportErrorsc�8�td|j�g|���S)Nz--temp-directory)r�mktemp)r$rs  rrzImportErrorsTests.runTrial0s���*�D�K�K�M�A�D�A�Arc��t|�|Sr!)�print)r$�stuffs  r�_printzImportErrorsTests._print3s��
�e���rc�0��t�|�||g|��i|��|Sr!)�super�assertIn�r$�	container�	containeer�kwargs�	__class__s     �rr/zImportErrorsTests.assertIn7s$���	����I�?��?��?��rc�0��t�|�||g|��i|��|Sr!)r.�assertNotInr0s     �rr6zImportErrorsTests.assertNotIn>s$���	���I�y�B�4�B�6�B��rc�$�|j�yr!)rr#s r�
test_trialRunzImportErrorsTests.test_trialRunEs���
�
�rc�p�|jd�}|j|d�|j|d�|S)Nztwisted.doesntexist�[ERROR]�rr/�r$�ds  r�test_nonexistentModulez(ImportErrorsTests.test_nonexistentModuleHs3���M�M�/�0���
�
�a��#��
�
�a�.�/��rc��|jd�}|j|d�|j|d�|j|d�|S)N�doesntexist�ModuleNotFoundr:r;r<s  r�test_nonexistentPackagez)ImportErrorsTests.test_nonexistentPackageNs@���M�M�-�(���
�
�a��'��
�
�a�)�*��
�
�a��#��rc��|jd�}|j|d�|j|d�|j|d�|S)Nzdoesntexist.barney�ObjectNotFoundr:r;r<s  r�!test_nonexistentPackageWithModulez3ImportErrorsTests.test_nonexistentPackageWithModuleUsB���M�M�.�/���
�
�a�-�.��
�
�a�)�*��
�
�a��#��rc��|jd�}|j|d�|j|d�|j|d�|S)N�
badpackager:�IOError�rr/r6r<s  r�test_badpackagez!ImportErrorsTests.test_badpackage\sA���M�M�,�'���
�
�a��#��
�
�a��&�����I�&��rc��|jd�}|j|d�|j|d�|j|d�|S)Nzbadpackage.test_moduler:rHrIr<s  r�test_moduleInBadpackagez)ImportErrorsTests.test_moduleInBadpackagecsC���M�M�2�3���
�
�a��#��
�
�a�1�2�����I�&��rc��|jd�}|j|d�|j|d�|j|d�|j|d�|S)Nzpackage.test_bad_moduler:rH�<module rIr<s  r�test_badmodulez ImportErrorsTests.test_badmodulejsS���M�M�3�4���
�
�a��#��
�
�a�2�3�����I�&�����J�'��rc��|jd�}|j|d�|j|d�|j|d�|j|d�|S)Nzpackage.test_import_moduler:rHrNrIr<s  r�test_badimportz ImportErrorsTests.test_badimportrsS���M�M�6�7���
�
�a��#��
�
�a�5�6�����I�&�����J�'��rc���|jd�}|j|d�|j|d�|j|d�|j|d�|j|d�|S)N�packager:�test_bad_module�test_import_modulerNrHrIr<s  r�test_recurseImportz$ImportErrorsTests.test_recurseImportzsa���M�M�)�$���
�
�a��#��
�
�a�*�+��
�
�a�-�.�����J�'�����I�&��rc��|jd�}|j|d�|j|d�|j|d�|j|t�|j|d�|j|d�|S)N�package2r:�test_modulerNrH�rr/�_noModuleErrorr6r<s  r�test_recurseImportErrorsz*ImportErrorsTests.test_recurseImportErrors�sm���M�M�*�%���
�
�a��#��
�
�a��$��
�
�a��'��
�
�a��(�����J�'�����I�&��rc��|jdd�}|j|d�|j|t�|j|d�|S)Nz-NrXr:rNrZr<s  r�test_nonRecurseImportErrorsz-ImportErrorsTests.test_nonRecurseImportErrors�sC���M�M�$�
�+���
�
�a��#��
�
�a��(�����J�'��rc��|jd�}|j|d�|j|d�|j|d�|j|d�|S)Nzpackage.test_moduler:rH�OK�PASSED (successes=1))rr6r/r<s  r�test_regularRunz!ImportErrorsTests.test_regularRun�sS���M�M�/�0������I�&�����I�&��
�
�a����
�
�a�/�0��rc�@�|j|j�|jtjj|jdd��}|j|d�|j|d�|j|d�|j|d�|S)NrSztest_module.pyr:rHr`ra�	�
mangleSysPath�oldPathr�os�path�join�parentr6r/r<s  r�
test_filenamezImportErrorsTests.test_filename�sz�����4�<�<�(��M�M�"�'�'�,�,�t�{�{�I�?O�P�Q������I�&�����I�&��
�
�a����
�
�a�/�0��rc�@�|j|j�|jtjj|jdd��}|j|d�|j|d�|j|d�|j|d�|S)NrSztest_dos_module.pyr:rHr`rardr<s  r�test_dosFilezImportErrorsTests.test_dosFile�sz�����4�<�<�(��M�M�"�'�'�,�,�t�{�{�I�?S�T�U������I�&�����I�&��
�
�a����
�
�a�/�0��r)�return�None�r�strrnrq)r+r	rnr	)
r1rqr2rqr�objectr3rrrnrq)rnrq)�__name__�
__module__�__qualname__�__doc__r%rjrr,r/r6r8r>rBrErJrLrOrQrVr\r^rbrkrm�
__classcell__)r4s@rrr&s�����
�!�F�B�����),��5;��GM��	�����),��5;��GM��	���������������rrrp)rv�
__future__rrg�ior�typingr�twisted.scriptsrrr�twisted.trial.testrr	r[r�SysPathManglingTestrr"rr�<module>r~sH���#�	���!� �'��T�]��*��
� G��4�4�Gr

Zerion Mini Shell 1.0