Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_runpy.cpython-310.pyc
o

�9jr��@s�ddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZmZddlmZmZmZddlmZmZddlmZmZddlZddlmZmZm Z m!Z!dZ"ddddddd�Z#eed	d
gej$ddde%e#dd
dd�d�Z&e&�'e#�Gdd�d�Z(Gdd�dej)e(�Z*Gdd�dej)e(�Z+Gdd�dej)e(�Z,Gdd�dej)�Z-e.dkr�e�/�dSdS)�N)�
no_tracing�verbose)�forget�make_legacy_pyc�unload)�create_empty_file�temp_dir)�make_script�make_zip_script)�	_run_code�_run_module_code�
run_module�run_patha�# Check basic code execution
result = ['Top level assignment']
def f():
    result.append('Lower level reference')
f()
del f
# Check the sys module
import sys
run_argv0 = sys.argv[0]
run_name_in_sys_modules = __name__ in sys.modules
module_in_sys_modules = (run_name_in_sys_modules and
                         globals() is sys.modules[__name__].__dict__)
# Check nested operation
import runpy
nested = runpy._run_module_code('x=1\n', mod_name='<run>')
)�__name__�__file__�
__cached__�__package__�__doc__�__spec__zTop level assignmentzLower level referenceF�z<run>)�xr�
__loader__)�sys�runpy�result�	run_argv0�run_name_in_sys_modules�module_in_sys_modules�nestedc@s$eZdZgd�Zdd�Zdd�ZdS)�CodeExecutionMixin)�name�parent�origin�cached�has_location�submodule_search_locationsc	Cs*|��}|��}t|�D]"}|�d�r.|�d�r.||vr!|�|�||dvr.|d�|�q|�d�}|�d�}|durC|�|�n/|jdurT|�t|j�t|j��|j	D]}d|}|t
||�f}|t
||�f}|�||�qW|�t|�t|��|D]}|||f}|||f}|�||�q~dS)zbCheck two namespaces match.

           Ignores any unspecified interpreter created names
        �__rrNz	__spec__.)�copy�list�
startswith�endswith�pop�assertIsNone�loader�assertEqual�type�CHECKED_SPEC_ATTRIBUTES�getattr�set)	�self�	result_ns�expected_ns�k�result_spec�
expected_spec�attr�actual�expected�r<�&/usr/lib/python3.10/test/test_runpy.py�assertNamespaceMatchesPs8
�


�
�z)CodeExecutionMixin.assertNamespaceMatchesc
Cs�t�}|��}|d}tjd}tj�||�}|d�}|�||�|�tjd|�|�tj�||�|�d|i}	||d<||	�}|�||	�|�||�|�tjd|�|�tj�||�|�dS)z�Check that an interface runs the example code correctly

           First argument is a callable accepting the initial globals and
           using them to create the actual namespace
           Second argument is the expected result
        rrN�sentinel)	�objectr'r�argv�modules�getr>�assertIs�assertIsNot)
r3�create_namespace�expected_namespacer?r5�run_name�saved_argv0�	saved_modr4�
initial_nsr<r<r=�check_code_executionxs 
z'CodeExecutionMixin.check_code_executionN)r�
__module__�__qualname__r0r>rLr<r<r<r=rDs	(rc@s eZdZdZdd�Zdd�ZdS)�ExecutionLayerTestCasez9Unit tests for runpy._run_code and runpy._run_module_codecCs.t��}|�ddi�dd�}|�||�dS)NrcSstti|�S�N)r�example_source��init_globalsr<r<r=�	create_ns��z7ExecutionLayerTestCase.test_run_code.<locals>.create_ns)�example_namespacer'�updaterL)r3r5rTr<r<r=�
test_run_code�s�z$ExecutionLayerTestCase.test_run_codecsdd�d}d}d}tjj�||d��t��}|��|||�|ddd����fdd	�}|�||�dS)
Nz
<Nonsense>zSome other nonsensezNow you're just being silly�)r"r-T)rrrrrrrrcstt|���SrP)rrQrR��mod_name�mod_specr<r=rT�s
�z>ExecutionLayerTestCase.test_run_module_code.<locals>.create_ns)�	importlib�	machinery�
ModuleSpecrVr'rWrL)r3�	mod_fname�
mod_loader�mod_packager5rTr<rZr=�test_run_module_code�s*��
z+ExecutionLayerTestCase.test_run_module_codeN)rrMrNrrXrcr<r<r<r=rO�s	rOc@seZdZdZdd�Zdd�Zdd�Zd:d	d
�Zd;ddd�d
d�Zdd�Z	dd�Z
d:ddd�dd�Zd:ddd�dd�Zdd�Z
d<dd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�ZdS)=�RunModuleTestCasezUnit tests for runpy.run_modulecCs4zt|�Wn
tyYdSw|�d|�dS)NzExpected import error for )r
�ImportError�fail)r3r[r<r<r=�expect_import_error�s�z%RunModuleTestCase.expect_import_errorcCs^|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d	�dS)
Nrzsys.imp.ericzos.path.halfza.beez.howardz..eatenz.test_runpyz	.unittest�multiprocessing)rg�r3r<r<r=�test_invalid_names�s







z$RunModuleTestCase.test_invalid_namescCs|�td�dd�dS)Nrr)r.r
rir<r<r=�test_library_module�sz%RunModuleTestCase.test_library_moduleFcCs,t�|�|r	dStj�|d�}t|�|S)N�__init__.py)�os�mkdir�path�joinr)r3�pkg_dir�	namespace�	pkg_fnamer<r<r=�_add_pkg_dir�s
zRunModuleTestCase._add_pkg_dir�
runpy_test�rr�parent_namespacescCsN|s|r
|s
td��d}|tjd}tj�t���}}	tdkr&td|	�t	j�
d|�tdkr9tdt	jd�|rh|g|}
||
d<|
D]!}tj�|	|�}	|�|	|�}tdkr^td	|	�tdkrgtd
|�qFtj�|	|�}
t
|
d��
}|�|�Wd�n1s�wYtdkr�td
|
�|d||}tj�||
�}||
||fS)
Nz2Can't mark top level module as a namespace package�
__runpy_pkg__�pyrz  Package tree in:rz  Updated sys.path:���z  Next level in:z
  Created:�w�.)�RuntimeErrorrm�extsepro�realpath�tempfile�mkdtempr�printr�insertrprt�open�writer]�util�spec_from_file_location)r3�source�depth�mod_baserrrw�pkg_name�
test_fnamerq�sub_dir�namespace_flags�namespace_flagrsr`�mod_filer[r\r<r<r=�	_make_pkg�s6
���zRunModuleTestCase._make_pkgc	Cs�ttj�D]}|�d�rtj|=qtdkrtd�tjd=tdkr%td�tj|dd�D]]\}}}|D](}zt�	tj�
||��Wq3ty[}ztdkrQt|�WYd}~q3d}~ww|D]*}tj�
||�}zt�|�Wq^ty�}ztdkr~t|�WYd}~q^d}~wwq,zt�|�tdkr�td�WdSWdSty�}ztdkr�t|�WYd}~dSWYd}~dSd}~ww)	Nrxrz  Removed sys.modules entriesrz  Removed sys.path entryF)�topdownz  Removed package tree)
r(rrBr)rr�rorm�walk�removerp�OSError�rmdir)	r3�top�entry�root�dirs�filesr �ex�fullnamer<r<r=�_del_pkg�s>
������
,��zRunModuleTestCase._del_pkgcCs`d}|d|7<|d|d<|d}tj�|j|d�}||d<|r.|d|7<dSdS)N�crrrr)r]r�r�r )r3�ns�	alter_sys�char_to_add�spec�new_specr<r<r=�_fix_ns_for_legacy_pycs
��z(RunModuleTestCase._fix_ns_for_legacy_pycc
	s$|jt|||d�\}}�}t��t��}|��||j��d�d|d���r1|�|ddd����fdd�}	zGtd	krBt	d
��|�
|	|�t��t
��t�|�tjsyt|�t��t��td	krmt	d��|�|��|�
|	|�W|�|�n|�|�wtd	kr�t	d�dSdS)
Nrvr|r�rrrrrT�rrrc�t�|�d�S�N�r��r
rR�r�r[r<r=rT6�z2RunModuleTestCase._check_module.<locals>.create_nsr�Running from source:�Running from compiled:�Module executed successfully)r�rQrrVr'rWr#�
rpartitionrr�rLr]�invalidate_caches�
__import__rmr�r�dont_write_bytecoderrr�r�)
r3r�r�rrrwrqr`r\r5rTr<r�r=�
_check_module!sJ�
���
�zRunModuleTestCase._check_modulec	s0|jt|d||d�\}}}}|�d�d�t|�t��}	|	�||tj�	|��|d���r7|	�|ddd����fdd	�}
zGt
d
krHtd��|�|
|	�t�
�t|�t�|�tjst|�t|�t
d
krotd��t�
�|�|	��|�|
|	�W|�|�n|�|�wt
d
kr�td
�dSdS)N�__main__rvr|rr�Tr�cr�r�r�rR�r�r�r<r=rT_r�z3RunModuleTestCase._check_package.<locals>.create_nsrr�r�zPackage executed successfully)r�rQr�rrVr'rWr]r��cache_from_sourcerr�rLr�r�rmr�rr�rrr�r�)r3r�r�rrrwrqr`r[r\r5rTr<r�r=�_check_packageIsL
�
�
��
�z RunModuleTestCase._check_packagecCs�|dkrtd��d}|}t|�D]}|}tj�||�}qtj�|d�}t|�tdkr0td|�tj�|d�}	|�|	�tdkrEtd|	�tj�|	d�}
|�|
�tdkrZtd	|
�tj�|
d
�}t|�tdkrptd|�dSdS)Nrz$Relative module test needs depth > 1rxz
sibling.pyz  Added sibling module:�unclez  Added uncle package:�cousinz  Added cousin package:z	nephew.pyz  Added nephew module:)	�
ValueError�rangermrorprrr�rt)r3�base_dirr�r�r��
module_dir�i�
parent_dir�
sibling_fname�	uncle_dir�
cousin_dir�nephew_fnamer<r<r=�_add_relative_modulesrs&

z'RunModuleTestCase._add_relative_modulesNc	Csbd}|�||�\}}}}|dur|}n|}z�|�|||�|�d�d}	tdkr-td|�t||d�}
|�|
d|�|�|
d|	�|�d	|
�|�d
|
�~
t�	�t
|�t�|�t
js�t|�t|�tdkrqtd|�t�	�t||d�}|�|d|�|�|d|	�|�d	|�|�d
|�~W|�|�n|�|�wtdkr�td�dSdS)
Nza\
from __future__ import absolute_import
from . import sibling
from ..uncle.cousin import nephew
r|rrr�)rHrr�sibling�nephewr�r�)r�r�r�rr�r
r.�assertInr]r�r�rmr�rr�rrr�)r3r�rH�contentsrqr`r[r\�
expected_namer��d1�d2r<r<r=�_check_relative_imports�sB

�
�z)RunModuleTestCase._check_relative_importscCs.td�D]}tdkrtd|�|�|�qdS)N�r�Testing package depth:�r�rr�r��r3r�r<r<r=�test_run_module�s�z!RunModuleTestCase.test_run_modulecC�6tdd�D]}tdkrtd|�|j|ddd�qdS�Nrr�r�Trvr�r�r<r<r=�$test_run_module_in_namespace_package���z6RunModuleTestCase.test_run_module_in_namespace_packagecCs0tdd�D]}tdkrtd|�|�|�qdS)Nrr�r��r�rr�r�r�r<r<r=�test_run_package���z"RunModuleTestCase.test_run_packagecCsx|�ddd�}|\}}}}|�dd�}|�|j|�tj�|dd�}ttt	t
f}|D]�}|j}|�|��}d�
|�}	t|dd	d
��
}
|
�|	�Wd�n1sQwYzt|�Wn|yv}z|�dt
|��WYd}~n
d}~ww|�d�
|��zt|d
�Wn|y�}z|�dt
|��WYd}~n
d}~ww|�d�
|��Wd�n1s�wYq*dS)NrYrr��	.__main__rxrlz raise {0}('{0} in __init__.py.')�wt�ascii��encodingzfinding speczNothing raised; expected {}z
.submodule)r��replace�
addCleanupr�rmrorpre�AttributeError�	TypeErrorr�r�subTest�formatr�r�r
�assertNotInrf)r3rrq�_r[�init�
exceptions�	exceptionr r�r��errr<r<r=� test_run_package_init_exceptions�s>
���������z2RunModuleTestCase.test_run_package_init_exceptionsc	Cs~|�dd�\}}}}z.t|�|�td��t|�Wd�n1s$wYW|�|�dSW|�|�dS|�|�w)NrYr�found in sys\.modules)r�r��assertWarnsRegex�RuntimeWarningr
r�)r3rqr�r[r<r<r=�test_submodule_imported_warning�s�
��z1RunModuleTestCase.test_submodule_imported_warningcCs�|�ddd�\}}}}|�|j|�|�dd�}t|�|�|tj�t�	��t�
dt�t|�Wd�n1s<wYt|�|�
td��
t|�Wd�dS1s[wYdS)NrYrr�r��errorr�)r�r�r�r�r�r�rrB�warnings�catch_warnings�simplefilterr�r
r�)r3rqr�r[�packager<r<r=� test_package_imported_no_warning�s

�
"�z2RunModuleTestCase.test_package_imported_no_warningcC�4tdd�D]}tdkrtd|�|j|dd�qdS)Nrr�r�T)rwr�r�r<r<r=�%test_run_package_in_namespace_package���z7RunModuleTestCase.test_run_package_in_namespace_packagecCr�)Nrr�r�T)rrr�r�r<r<r=�test_run_namespace_package�r�z,RunModuleTestCase.test_run_namespace_packagecCr�r�r�r�r<r<r=�/test_run_namespace_package_in_namespace_package�r�zARunModuleTestCase.test_run_namespace_package_in_namespace_packagecCs2td�D]}tdkrtd|�|j|dd�qdS)Nr�rr�Tr�r�r�r<r<r=�test_run_module_alter_syss�z+RunModuleTestCase.test_run_module_alter_syscCr�)Nrr�r�Tr�r�r�r<r<r=�test_run_package_alter_sys	r�z,RunModuleTestCase.test_run_package_alter_syscCs0tdd�D]}tdkrtd|�|�|�qdS)N��rz"Testing relative imports at depth:�r�rr�r�r�r<r<r=�test_explicit_relative_importr�z/RunModuleTestCase.test_explicit_relative_importcCs2tdd�D]}tdkrtd|�|�|d�qdS)Nr�r�rz'Testing main relative imports at depth:r�rr�r<r<r=�test_main_relative_imports�z+RunModuleTestCase.test_main_relative_importc	s�d}d�|�t|�\}}�}t��t��}|��|tj�|���	d�d|d����fdd�}z|�
||�W|�|�dS|�|�w)Nrz*And now for something completely differentr|rr�cst�|��SrPr�rR�r[rHr<r=rT&rUz2RunModuleTestCase.test_run_name.<locals>.create_ns)r�rQrrVr'rWr]r�r�r�rLr�)r3r�rqr`r\r5rTr<rr=�
test_run_names"

�
�zRunModuleTestCase.test_run_namecCsxddl}d}d}ddg}d|dg}t�}t�}td|�D]+}d	�|g|�}	|�|	�|D]}
|�|	d	|
�q.|D]}
|�|	d	|
�q<qd	�|g|�}	|�|	�|�|	d
�|�d|�\}}}
}|�|j|�td|d�D]	}|�|d|�qu|�	|g�D]"}|�
||j�|�
|jt
jj�|jr�|�|j�q�|�|j�q�|�t|�d|�|�t|�d|�dS)
Nrr�rxr�zuncle.cousinzuncle.cousin.nephewz.siblingrr|z.runpy_testrYr�)�pkgutilr2r�rp�addr�r�r�r��
walk_packages�assertIsInstance�
ModuleInfo�
module_finderr]r^�
FileFinder�ispkgr�r r.�len)r3r�	max_depth�	base_name�package_suffixes�module_suffixes�expected_packages�expected_modulesr�r�r rqr`r[r\�
moduleinfor<r<r=�test_pkgutil_walk_packages-sB
�


��z,RunModuleTestCase.test_pkgutil_walk_packages)F)rurP)rrMrNrrgrjrkrtr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr<r<r<r=rd�sD
��(�)
(
rdc@s�eZdZdZ	d#dd�Z		d$dd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zedd ��Zd!d"�ZdS)%�RunPathTestCasezUnit tests for runpy.run_pathNFcCs|durt}t||||�SrP)rQr	)r3�
script_dir�script_basenamer��omit_suffixr<r<r=�_make_test_scriptTs
�z!RunPathTestCase._make_test_scriptTc
s��fdd�}t��}	|dur|}
n|}
|r%tj�|
|�}|j}|s$d|_nd}}|	�|||d||ddd��|�||	�d���fdd�}|r\|dur\tj��|�}|sXd|_||	d<�|	d	<��	d
�d|	d<|�||	�dS)
Ncs
t�|�SrP�rrR)�script_namer<r=rT_s
z0RunPathTestCase._check_script.<locals>.create_nsrYT)rrrrrrrrzprove.issue15230.is.fixedcst�|��SrPrrR�rHrr<r=rT|rUrrr|rr)
rVr'r]r�r�r#r-rWrLr�)
r3rr��
expected_file�expected_argv0r[�expect_spec�check_loaderrTr5�	spec_namer\�
mod_cachedr<rr=�
_check_script[sJ���
�zRunPathTestCase._check_scriptcCst�|�}|�t|t|�dSrP)�re�escape�assertRaisesRegexrer)r3r�msgr<r<r=�_check_import_error�s
z#RunPathTestCase._check_import_errorcCsPt��}d}|�||�}|j|d||dd�Wd�dS1s!wYdS�N�script�
<run_path>F�r �rrr$�r3rr[rr<r<r=�test_basic_script��
�"�z!RunPathTestCase.test_basic_scriptcCsVt��}d}t�|�||��}|j|d||dd�Wd�dS1s$wYdSr*)r�pathlib�Pathrr$r/r<r<r=�"test_basic_script_with_path_object�s
�
�"�z2RunPathTestCase.test_basic_script_with_path_objectcCsTt��}d}|j||dd�}|j|d||dd�Wd�dS1s#wYdS)Nr+T)rr,Fr-r.r/r<r<r=�test_basic_script_no_suffix�s�
�"�z+RunPathTestCase.test_basic_script_no_suffixcCsht��'}d}|�||�}tj|dd�}t�|�|j|d||dd�Wd�dS1s-wYdS)Nr+T��doraiser,Fr-)rr�
py_compile�compilermr�r$)r3rr[r�
compiled_namer<r<r=�test_script_compiled�s

�"�z$RunPathTestCase.test_script_compiledcCsPt��}d}|�||�}|j|d|||d�Wd�dS1s!wYdS)Nr�r,�r[r.r/r<r<r=�test_directory�r1zRunPathTestCase.test_directorycCs�t��6}d}|�||�}tj|dd�}t�|�tjs1t|�}|j	|d|||d�Wd�dSWd�dS1s<wYdS)Nr�Tr6r,r<)
rrr8r9rmr�rr�rr$)r3rr[rr:�
legacy_pycr<r<r=�test_directory_compiled�s

��"�z'RunPathTestCase.test_directory_compiledcCsPt��}d}|�||�}d|}|�||�Wd�dS1s!wYdS)N�not_main�"can't find '__main__' module in %r)rrr))r3rr[rr(r<r<r=�test_directory_error�s"�z$RunPathTestCase.test_directory_errorc	Csbt��$}d}|�||�}t|d|�\}}|j|d|||dd�Wd�dS1s*wYdS)Nr��test_zipr,F�r[r!)rrr
r$)r3rr[r�zip_name�fnamer<r<r=�test_zipfile�s�"�zRunPathTestCase.test_zipfilec	Cspt��+}d}|�||�}tj|dd�}t|d|�\}}|j|d|||dd�Wd�dS1s1wYdS)Nr�Tr6rCr,FrD)rrr8r9r
r$)r3rr[rr:rErFr<r<r=�test_zipfile_compiled�s��"�z%RunPathTestCase.test_zipfile_compiledcCs`t��#}d}|�||�}t|d|�\}}d|}|�||�Wd�dS1s)wYdS)Nr@rCrA)rrr
r))r3rr[rrErFr(r<r<r=�test_zipfile_error�s"�z"RunPathTestCase.test_zipfile_errorc	Cs�t��@}t��$}d}d|}|�|||�}t|d|�\}}|�tt|�Wd�n1s.wYWd�dSWd�dS1sFwYdS)Nr�z import runpy
runpy.run_path(%r)
rC)rrr
�assertRaises�RecursionErrorr)r3r�	dummy_dirr[r�rrErFr<r<r=�test_main_recursion_error�s�P�z)RunPathTestCase.test_main_recursion_errorc	Cs�t��8}tj�|d�}t|ddd��
}|�d�Wd�n1s"wYt|�}|�|dd�Wd�dS1s>wYdS)Nz	script.pyr{�latin1r�u%
#coding:latin1
s = "non-ASCII: hé"
�sunon-ASCII: hé)rrmrorpr�r�rr.)r3r�filename�frr<r<r=�
test_encoding�s�"�zRunPathTestCase.test_encoding)NF)NTT)rrMrNrrr$r)r0r4r5r;r=r?rBrGrHrIrrMrRr<r<r<r=rQs*
�
�-	

	rcs�eZdZdZejdkr
enejZe	e
jdd���Z�fdd�Z
dd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Z�ZS)�TestExitl:�win32cos:�t��}t�|�VWd�dS1swYdSrP)rr2r3)�args�kwargs�tmp_fnr<r<r=�tmp_path�s�"�zTestExit.tmp_pathcs^|���!}|d|_}|�t�d��t�j|i|��Wd�dS1s(wYdS)Nzham.pyz@                    raise KeyboardInterrupt
                    )rX�ham�
write_text�textwrap�dedent�super�run)r3rUrV�tmprY��	__class__r<r=r^s
��"�zTestExit.runcOsBtj|i|�dtjd���}|�|j�d��|�|j|j�dS)NT)�text�stderrz
KeyboardInterrupt
)	�
subprocessr^�PIPE�
assertTruercr*r.�
returncode�
EXPECTED_CODE)r3rUrV�procr<r<r=�assertSigIntszTestExit.assertSigIntcCs|�tj|jg�dSrP)rjr�
executablerYrir<r<r=�test_pymain_run_fileszTestExit.test_pymain_run_filecC�8|jj}|d}|�t�d��|jtj|g|d�dS)Nz
run_module.pyzU                import runpy
                runpy.run_module("ham")
                ��cwd�rYr!rZr[r\rjrrk)r3r_r
r<r<r=�%test_pymain_run_file_runpy_run_module���z.TestExit.test_pymain_run_file_runpy_run_modulecCrm)Nzrun_module_as_main.pyz^                import runpy
                runpy._run_module_as_main("ham")
                rnrp)r3r_�run_module_as_mainr<r<r=�-test_pymain_run_file_runpy_run_module_as_main$rrz6TestExit.test_pymain_run_file_runpy_run_module_as_maincC�|jtjddg|jjd�dS)N�-cz%import runpy; runpy.run_module('ham')rn�rjrrkrYr!rir<r<r=�"test_pymain_run_command_run_module1s

�z+TestExit.test_pymain_run_command_run_modulecCru)Nrv�
import hamrnrwrir<r<r=�test_pymain_run_command7sz TestExit.test_pymain_run_commandcCs|jtjgd|jjd�dS)Nry)�inputrorwrir<r<r=�test_pymain_run_stdin:szTestExit.test_pymain_run_stdincCs$|j}|jtjd|jg|jd�dS)Nz-mrn)rYrjrrk�stemr!)r3rYr<r<r=�test_pymain_run_module=szTestExit.test_pymain_run_module)rrMrN�STATUS_CONTROL_C_EXITr�platform�signal�SIGINTrh�staticmethod�
contextlib�contextmanagerrXr^rjrlrqrtrxrzr|r~�
__classcell__r<r<r`r=rS�s$
��

rSr�)0r��importlib.machineryr]�importlib.util�os.pathrmr2r8r%r�rdrr�r[�unittestr��test.supportrr�test.support.import_helperrrr�test.support.os_helperrr�test.support.script_helperr	r
rrrr
rrQ�implicit_namespacerA�dictrVrWr�TestCaserOrdrrSr�mainr<r<r<r=�<module>sd�	��

O'%M�

Youez - 2016 - github.com/yon3zu
LinuXploit