HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/twisted/trial/test/__pycache__/test_output.cpython-38.pyc
U


W[��@s�dZddlmZmZmZddlZddlmZmZddl	m
Z
ddlmZddl
mZer^dZnd	Zd
d�ZGdd
�d
ej�ZdS)z*
Tests for the output generated by trial.
�)�absolute_import�division�print_functionN)�NativeStringIO�_PY3)�trial)�runner)�packageszNo module named 'frotz'zNo module named frotzcGsVddlm}t��}|�|�t�}tj|j||dd�}t�	|�}|�
|�|��S)Nr)�reporterztemp-directory)�streamZworkingDirectory)�
twisted.trialr
rZOptionsZparseOptionsrrZTrialRunnerZVerboseTextReporterZ	_getSuite�run�getvalue)�argsr
Zconfig�outputZmyRunnerZsuite�r�@/usr/lib/python3/dist-packages/twisted/trial/test/test_output.py�runTrials
�

rcs�eZdZdZdZdZdd�Zdd�Z�fdd	�Z�fd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Z�ZS)(�ImportErrorsTestszbActually run trial as if on the command line and check that the output
    is what we expect.
    FZ_testImportErrorscGstd|��f|��S)Nz--temp-directory)rZmktemp)�selfrrrrr.szImportErrorsTests.runTrialcCst|�|S�N)�print)rZstuffrrr�_print2szImportErrorsTests._printcstt|�j||f|�|�|Sr)�superr�assertIn�rZ	containerZ	containeer�kwargs��	__class__rrr7s
���zImportErrorsTests.assertIncstt|�j||f|�|�|Sr)rr�assertNotInrrrrr>s
���zImportErrorsTests.assertNotIncCs|��dSr)r)rrrr�
test_trialRunEszImportErrorsTests.test_trialRuncCs&|�d�}|�|d�|�|d�|S)Nztwisted.doesntexist�[ERROR]�rr�r�drrr�test_nonexistentModuleIs
z(ImportErrorsTests.test_nonexistentModulecCs2|�d�}|�|d�|�|d�|�|d�|S)NZdoesntexistZModuleNotFoundr!r"r#rrr�test_nonexistentPackagePs

z)ImportErrorsTests.test_nonexistentPackagecCs2|�d�}|�|d�|�|d�|�|d�|S)Nzdoesntexist.barneyZObjectNotFoundr!r"r#rrr�!test_nonexistentPackageWithModuleXs

z3ImportErrorsTests.test_nonexistentPackageWithModulecCs2|�d�}|�|d�|�|d�|�|d�|S)NZ
badpackager!�IOError�rrrr#rrr�test_badpackage`s

z!ImportErrorsTests.test_badpackagecCs2|�d�}|�|d�|�|d�|�|d�|S)Nzbadpackage.test_moduler!r(r)r#rrr�test_moduleInBadpackagehs

z)ImportErrorsTests.test_moduleInBadpackagecCs>|�d�}|�|d�|�|d�|�|d�|�|d�|S)Nzpackage.test_bad_moduler!r(�<module r)r#rrr�test_badmoduleps
z ImportErrorsTests.test_badmodulecCs>|�d�}|�|d�|�|d�|�|d�|�|d�|S)Nzpackage.test_import_moduler!r(r,r)r#rrr�test_badimportys
z ImportErrorsTests.test_badimportcCsJ|�d�}|�|d�|�|d�|�|d�|�|d�|�|d�|S)N�packager!Ztest_bad_moduleZtest_import_moduler,r(r)r#rrr�test_recurseImport�s
z$ImportErrorsTests.test_recurseImportcCsV|�d�}|�|d�|�|d�|�|d�|�|t�|�|d�|�|d�|S)N�package2r!Ztest_moduler,r(�rr�_noModuleErrorrr#rrr�test_recurseImportErrors�s
z*ImportErrorsTests.test_recurseImportErrorscCs4|�dd�}|�|d�|�|t�|�|d�|S)Nz-Nr1r!r,r2r#rrr�test_nonRecurseImportErrors�s
z-ImportErrorsTests.test_nonRecurseImportErrorscCs>|�d�}|�|d�|�|d�|�|d�|�|d�|S)Nzpackage.test_moduler!r(�OK�PASSED (successes=1))rrrr#rrr�test_regularRun�s
z!ImportErrorsTests.test_regularRuncCsX|�|j�|�tj�|jdd��}|�|d�|�|d�|�|d�|�|d�|S)Nr/ztest_module.pyr!r(r6r7�	Z
mangleSysPathZoldPathr�os�path�join�parentrrr#rrr�
test_filename�s�zImportErrorsTests.test_filenamecCsX|�|j�|�tj�|jdd��}|�|d�|�|d�|�|d�|�|d�|S)Nr/ztest_dos_module.pyr!r(r6r7r9r#rrr�test_dosFile�s
��zImportErrorsTests.test_dosFile)�__name__�
__module__�__qualname__�__doc__�debugr=rrrrr r%r&r'r*r+r-r.r0r4r5r8r>r?�
__classcell__rrrrr's*		
	r)rCZ
__future__rrrr:Ztwisted.python.compatrrZtwisted.scriptsrrrZtwisted.trial.testr	r3rZSysPathManglingTestrrrrr�<module>s