Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.118.7.190
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_runpy.cpython-310.pyc
o

ab���@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�popZassertIsNone�loader�assertEqual�type�CHECKED_SPEC_ATTRIBUTES�getattr�set)	�self�	result_ns�expected_ns�kZresult_specZ
expected_spec�attr�actualZexpected�r8�8/usr/local/python-3.10/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:ZassertIsZassertIsNot)
r2Zcreate_namespaceZexpected_namespacer;r4�run_nameZsaved_argv0Z	saved_modr3Z
initial_nsr8r8r9�check_code_executionxs 
z'CodeExecutionMixin.check_code_executionN)r�
__module__�__qualname__r/r:rAr8r8r8r9rDs	(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�Zinit_globalsr8r8r9�	create_ns��z7ExecutionLayerTestCase.test_run_code.<locals>.create_ns)�example_namespacer'�updaterA)r2r4rHr8r8r9�
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|���SrE)rrFrG��mod_name�mod_specr8r9rH�s
�z>ExecutionLayerTestCase.test_run_module_code.<locals>.create_ns)�	importlib�	machinery�
ModuleSpecrJr'rKrA)r2�	mod_fnameZ
mod_loaderZmod_packager4rHr8rNr9�test_run_module_code�s*��
z+ExecutionLayerTestCase.test_run_module_codeN)rrBrCrrLrUr8r8r8r9rD�s	rDc@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)r2rOr8r8r9�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)rY�r2r8r8r9�test_invalid_names�s







z$RunModuleTestCase.test_invalid_namescCs|�td�dd�dS)Nrr)r-r
r[r8r8r9�test_library_module�sz%RunModuleTestCase.test_library_moduleFcCs,t�|�|r	dStj�|d�}t|�|S)N�__init__.py)�os�mkdir�path�joinr)r2�pkg_dir�	namespace�	pkg_fnamer8r8r9�_add_pkg_dir�s
zRunModuleTestCase._add_pkg_dir�
runpy_test�rd�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�.)�RuntimeErrorr_�extsepra�realpath�tempfile�mkdtempr�printr�insertrbrf�open�writerQ�util�spec_from_file_location)r2�source�depthZmod_baserdri�pkg_nameZ
test_fnamercZsub_dirZnamespace_flagsZnamespace_flagrerT�mod_filerOrPr8r8r9�	_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)	Nrjrz  Removed sys.modules entriesrz  Removed sys.path entryF)�topdownz  Removed package tree)
r(rr>r)rrtrar_�walk�removerb�OSError�rmdir)	r2�top�entry�root�dirs�filesr �ex�fullnamer8r8r9�_del_pkg�s>
������
,��zRunModuleTestCase._del_pkgcCs`d}|d|7<|d|d<|d}tj�|j|d�}||d<|r.|d|7<dSdS)N�crrrr)rQrxryr )r2�ns�	alter_sysZchar_to_add�specZnew_specr8r8r9�_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)
Nrhrnr�rrrrrT�rrrc�t�|�d�S�N�r��r
rG�r�rOr8r9rH6�z2RunModuleTestCase._check_module.<locals>.create_nsr�Running from source:�Running from compiled:�Module executed successfully)r~rFrrJr'rKr#�
rpartitionrrtrArQ�invalidate_caches�
__import__r_r�r�dont_write_bytecoderrr�r�)
r2r{r�rdrircrTrPr4rHr8r�r9�
_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__rhrnrr�Tr�cr�r�r�rG�r�r|r8r9rH_r�z3RunModuleTestCase._check_package.<locals>.create_nsrr�r�zPackage executed successfully)r~rFr�rrJr'rKrQrx�cache_from_sourcerrtrAr�r�r_r�rr�rrr�r�)r2r{r�rdrircrTrOrPr4rHr8r�r9�_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 > 1rjz
sibling.pyz  Added sibling module:�unclez  Added uncle package:Zcousinz  Added cousin package:z	nephew.pyz  Added nephew module:)	�
ValueError�ranger_rarbrrrtrf)r2�base_dirrzr{r|Z
module_dir�iZ
parent_dirZ
sibling_fnameZ	uncle_dirZ
cousin_dirZnephew_fnamer8r8r9�_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
rnrrr�)r@rrZsiblingZnephewr�r�)r~r�r�rrtr
r-�assertInrQr�r�r_r�rr�rrr�)r2r{r@�contentsrcrTrOrP�
expected_namer|Zd1Zd2r8r8r9�_check_relative_imports�sB

�
�z)RunModuleTestCase._check_relative_importscCs.td�D]}tdkrtd|�|�|�qdS)N�r�Testing package depth:�r�rrtr��r2r{r8r8r9�test_run_module�s�z!RunModuleTestCase.test_run_modulecC�6tdd�D]}tdkrtd|�|j|ddd�qdS�Nrr�r�Trhr�r�r8r8r9�$test_run_module_in_namespace_package���z6RunModuleTestCase.test_run_module_in_namespace_packagecCs0tdd�D]}tdkrtd|�|�|�qdS)Nrr�r��r�rrtr�r�r8r8r9�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)NrMrr��	.__main__rjr^z raise {0}('{0} in __init__.py.')Zwt�ascii��encodingzfinding speczNothing raised; expected {}z
.submodule)r~�replace�
addCleanupr�r_rarbrW�AttributeError�	TypeErrorr�rZsubTest�formatrvrwr
ZassertNotInrX)r2rrc�_rOZinit�
exceptions�	exceptionr rzr}�errr8r8r9� test_run_package_init_exceptions�s>
���������z2RunModuleTestCase.test_run_package_init_exceptionsc	Cs~|�dd�\}}}}z.t|�|�td��t|�Wd�n1s$wYW|�|�dSW|�|�dS|�|�w)NrMr�found in sys\.modules)r~r��assertWarnsRegex�RuntimeWarningr
r�)r2rcr�rOr8r8r9�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)NrMrr�r��errorr�)r~r�r�r�r�r�rr>�warnings�catch_warnings�simplefilterr�r
r�)r2rcr�rO�packager8r8r9� test_package_imported_no_warning�s

�
"�z2RunModuleTestCase.test_package_imported_no_warningcC�4tdd�D]}tdkrtd|�|j|dd�qdS)Nrr�r�T)rir�r�r8r8r9�%test_run_package_in_namespace_package���z7RunModuleTestCase.test_run_package_in_namespace_packagecCr�)Nrr�r�T)rdr�r�r8r8r9�test_run_namespace_package�r�z,RunModuleTestCase.test_run_namespace_packagecCr�r�r�r�r8r8r9�/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�r8r8r9�test_run_module_alter_syss�z+RunModuleTestCase.test_run_module_alter_syscCr�)Nrr�r�Tr�r�r�r8r8r9�test_run_package_alter_sys	r�z,RunModuleTestCase.test_run_package_alter_syscCs0tdd�D]}tdkrtd|�|�|�qdS)N��rz"Testing relative imports at depth:�r�rrtr�r�r8r8r9�test_explicit_relative_importr�z/RunModuleTestCase.test_explicit_relative_importcCs2tdd�D]}tdkrtd|�|�|d�qdS)Nr�r�rz'Testing main relative imports at depth:r�r�r�r8r8r9�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 differentrnrr�cst�|��SrEr�rG�rOr@r8r9rH&rIz2RunModuleTestCase.test_run_name.<locals>.create_ns)r~rFrrJr'rKrQrxr�r�rAr�)r2r{rcrTrPr4rHr8r�r9�
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�rjr�zuncle.cousinzuncle.cousin.nephewz.siblingrrnz.runpy_testrMr�)�pkgutilr1r�rb�addr~r�r�r�Z
walk_packagesZassertIsInstanceZ
ModuleInfoZ
module_finderrQrR�
FileFinderZispkgr�r r-�len)r2r�Z	max_depth�	base_nameZpackage_suffixesZmodule_suffixesZexpected_packagesZexpected_modulesr{r|r rcrTrOrPZ
moduleinfor8r8r9�test_pkgutil_walk_packages-sB
�


��z,RunModuleTestCase.test_pkgutil_walk_packages)F)rgrE)rrBrCrrYr\r]rfr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r8r8r8r9rV�sD
��(�)
(
rVc@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||||�SrE)rFr	)r2�
script_dirZscript_basenamerz�omit_suffixr8r8r9�_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�|�SrE�rrG)�script_namer8r9rH_s
z0RunPathTestCase._check_script.<locals>.create_nsrMT)rrrrrrrrzprove.issue15230.is.fixedcst�|��SrEr�rG�r@r�r8r9rH|rIrrrnrr)
rJr'rQrxryr#r,rKrAr�)
r2r�r�Z
expected_fileZexpected_argv0rO�expect_spec�check_loaderrHr4Z	spec_namerPZ
mod_cachedr8r�r9�
_check_script[sJ���
�zRunPathTestCase._check_scriptcCst�|�}|�t|t|�dSrE)�re�escape�assertRaisesRegexrWr)r2r��msgr8r8r9�_check_import_error�s
z#RunPathTestCase._check_import_errorcCsPt��}d}|�||�}|j|d||dd�Wd�dS1s!wYdS�N�script�
<run_path>F�r��rr�r��r2r�rOr�r8r8r9�test_basic_script��
�"�z!RunPathTestCase.test_basic_scriptcCsVt��}d}t�|�||��}|j|d||dd�Wd�dS1s$wYdSr�)r�pathlib�Pathr�r�r�r8r8r9�"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)r�r�Fr�r�r�r8r8r9�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�compiler_r�r�)r2r�rOr��
compiled_namer8r8r9�test_script_compiled�s

�"�z$RunPathTestCase.test_script_compiledcCsPt��}d}|�||�}|j|d|||d�Wd�dS1s!wYdS)Nr�r��rOr�r�r8r8r9�test_directory�r�zRunPathTestCase.test_directorycCs�t��6}d}|�||�}tj|dd�}t�|�tjs1t|�}|j	|d|||d�Wd�dSWd�dS1s<wYdS)Nr�Trr�r)
rr�rrr_r�rr�rr�)r2r�rOr�rZ
legacy_pycr8r8r9�test_directory_compiled�s

��"�z'RunPathTestCase.test_directory_compiledcCsPt��}d}|�||�}d|}|�||�Wd�dS1s!wYdS)N�not_main�"can't find '__main__' module in %r)rr�r�)r2r�rOr�r�r8r8r9�test_directory_error�s"�z$RunPathTestCase.test_directory_errorc	Csbt��$}d}|�||�}t|d|�\}}|j|d|||dd�Wd�dS1s*wYdS)Nr��test_zipr�F�rOr�)rr�r
r�)r2r�rOr��zip_name�fnamer8r8r9�test_zipfile�s�"�zRunPathTestCase.test_zipfilec	Cspt��+}d}|�||�}tj|dd�}t|d|�\}}|j|d|||dd�Wd�dS1s1wYdS)Nr�Trrr�Fr)rr�rrr
r�)r2r�rOr�rrrr8r8r9�test_zipfile_compiled�s��"�z%RunPathTestCase.test_zipfile_compiledcCs`t��#}d}|�||�}t|d|�\}}d|}|�||�Wd�dS1s)wYdS)Nrrr)rr�r
r�)r2r�rOr�rrr�r8r8r9�test_zipfile_error�s"�z"RunPathTestCase.test_zipfile_errorc		Cs�t��C}t��'}d}d|}|�|||�}t|d|�\}}d}|�t|t|�Wd�n1s1wYWd�dSWd�dS1sIwYdS)Nr�z import runpy
runpy.run_path(%r)
rzrecursion depth exceeded)rr�r
r��RecursionErrorr)	r2r�Z	dummy_dirrOrzr�rrr�r8r8r9�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.pyrm�latin1r�u%
#coding:latin1
s = "non-ASCII: hé"
�sunon-ASCII: hé)rr_rarbrvrwrr-)r2r��filename�frr8r8r9�
test_encoding�s�"�zRunPathTestCase.test_encoding)NF)NTT)rrBrCrr�r�r�r�rrrr	r
r
rrrrrrr8r8r8r9r�Qs*
�
�-	


r�cs�eZdZdZejdkr
enejZe	e
jdd���Z�fdd�Z
dd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Z�ZS)�TestExitl:�win32cos:�t��}t�|�VWd�dS1swYdSrE)rr�r�)�args�kwargsZtmp_fnr8r8r9�tmp_path�s�"�zTestExit.tmp_pathcs^|���!}|d|_}|�t�d��t�j|i|��Wd�dS1s(wYdS)Nzham.pyz@                    raise KeyboardInterrupt
                    )r �ham�
write_text�textwrap�dedent�super�run)r2rr�tmpr!��	__class__r8r9r&s
��"�zTestExit.runcOsBtj|i|�dtjd���}|�|j�d��|�|j|j�dS)NT)�text�stderrz
KeyboardInterrupt
)	�
subprocessr&�PIPEZ
assertTruer+r*r-�
returncode�
EXPECTED_CODE)r2rr�procr8r8r9�assertSigIntszTestExit.assertSigIntcCs|�tj|jg�dSrE)r1r�
executabler!r[r8r8r9�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�r!r!r"r#r$r1rr2)r2r'r
r8r8r9�%test_pymain_run_file_runpy_run_module���z.TestExit.test_pymain_run_file_runpy_run_modulecCr4)Nzrun_module_as_main.pyz^                import runpy
                runpy._run_module_as_main("ham")
                r5r7)r2r'Zrun_module_as_mainr8r8r9�-test_pymain_run_file_runpy_run_module_as_main%r9z6TestExit.test_pymain_run_file_runpy_run_module_as_maincC�|jtjddg|jjd�dS)N�-cz%import runpy; runpy.run_module('ham')r5�r1rr2r!r!r[r8r8r9�"test_pymain_run_command_run_module2s

�z+TestExit.test_pymain_run_command_run_modulecCr;)Nr<�
import hamr5r=r[r8r8r9�test_pymain_run_command8sz TestExit.test_pymain_run_commandcCs|jtjgd|jjd�dS)Nr?)�inputr6r=r[r8r8r9�test_pymain_run_stdin;szTestExit.test_pymain_run_stdincCs$|j}|jtjd|jg|jd�dS)Nz-mr5)r!r1rr2�stemr!)r2r!r8r8r9�test_pymain_run_module>szTestExit.test_pymain_run_module)rrBrCZSTATUS_CONTROL_C_EXITr�platform�signal�SIGINTr/�staticmethod�
contextlib�contextmanagerr r&r1r3r8r:r>r@rBrD�
__classcell__r8r8r(r9r�s$��

rr�)0rI�importlib.machineryrQ�importlib.utilZos.pathr_r�rr�rFr,rrrr#Zunittestr�Ztest.supportrrZtest.support.import_helperrrrZtest.support.os_helperrrZtest.support.script_helperr	r
rrrr
rrFZimplicit_namespacer=�dictrJrKrZTestCaserDrVr�rr�mainr8r8r8r9�<module>sd�	��

O'&M�
© 2025 GrazzMean