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_modulefinder.cpython-310.pyc
o

�9j�0�@s�ddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
e��Zeej
�ej�gZdgd�dgdgdgZdgd�dgdgd	gZdgd
�ddggdgZdgd
�ddggdgZdgd�ggdgZdgd�ggdgZdddgdggdgZdddgggdgZddgggdgZdgd�dggdgZdgd�dggdgZdddgggd gZdddgggd!gZd"d"dgggd#d$�d%�gZd&d'�Z d(d)�Z!Gd*d+�d+ej"�Z#e$d,kr�e�%�dSdS)-�N)�support�a.module)�ar�sys�b�czb.somethingz�a/__init__.py
a/module.py
                                from b import something
                                from c import something
b/__init__.py
                                from sys import *
)rrrr�
__future__aa/__init__.py
a/module.py
                                from b import something
                                from c import something
b/__init__.py
                                from __future__ import absolute_import
                                from sys import *
)r�a.bza.cr�mymoduler�blahblahamymodule.py
a/__init__.py
                                import blahblah
                                from a import b
                                import c
a/module.py
                                import sys
                                from a import b as x
                                from a.c import sillyname
a/b.py
a/c.py
                                from a.module import x
                                import mymodule as sillyname
                                from sys import version_info
)	rrrzb.xzb.yzb.zrr�gc�zajmymodule.py
a/__init__.py
a/module.py
                                from __future__ import absolute_import
                                import sys # sys
                                import blahblah # fails
                                import gc # gc
                                import b.x # b.x
                                from b import y # b.y
                                from b.z import * # b.z.*
a/gc.py
a/sys.py
                                import mymodule
a/b/__init__.py
a/b/x.py
a/b/y.py
a/b/z.py
b/__init__.py
                                import z
b/unused.py
b/x.py
b/y.py
b/z.py
)rrrr	�a.b.y�a.b.z�a.b.c�
a.b.c.moduleC�a.b.c.d�a.b.c.e�a.b.xra�mymodule.py
a/__init__.py
                                from .b import y, z # a.b.y, a.b.z
a/module.py
                                from __future__ import absolute_import # __future__
                                import gc # gc
a/gc.py
a/sys.py
a/b/__init__.py
                                from ..b import x # a.b.x
                                #from a.b.c import moduleC
                                from .c import moduleC # a.b.moduleC
a/b/x.py
a/b/y.py
a/b/z.py
a/b/g.py
a/b/c/__init__.py
                                from ..c import e # a.b.c.e
a/b/c/moduleC.py
                                from ..c import d # a.b.c.d
a/b/c/d.py
a/b/c/e.py
a/b/c/x.py
)
rrza.sysr	rrrrrrza.b.c.frz	a.anothera�mymodule.py
a/__init__.py
                                from . import sys # a.sys
a/another.py
a/module.py
                                from .b import y, z # a.b.y, a.b.z
a/gc.py
a/sys.py
a/b/__init__.py
                                from .c import moduleC # a.b.c.moduleC
                                from .c import d # a.b.c.d
a/b/x.py
a/b/y.py
a/b/z.py
a/b/c/__init__.py
                                from . import e # a.b.c.e
a/b/c/moduleC.py
                                #
                                from . import f   # a.b.c.f
                                from .. import x  # a.b.x
                                from ... import another # a.another
a/b/c/d.py
a/b/c/e.py
a/b/c/f.py
rza.barz�a/__init__.py
                                def foo(): pass
a/module.py
                                from . import foo
                                from . import bar
zza/__init__.py
                                def foo(): pass
a/module.py
                                from . import *
�)rrrzb.modulez�a/__init__.py
a/module.py
                                import b.module
b/__init__.py
b/module.py
                                ?  # SyntaxError: invalid syntax
)rrrzb.cz�a/__init__.py
a/module.py
                                import c
                                from b import c
b/__init__.py
b/c.py
�a_utf8�b_utf8u�a_utf8.py
                                # use the default of utf8
                                print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
                                import b_utf8
b_utf8.py
                                # use the default of utf8
                                print('Unicode test B code point 2090 ₐ that is not valid in cp1252')
uza_utf8.py
                                # coding=utf8
                                print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
                                import b_utf8
b_utf8.py
                                # use the default of utf8
                                print('Unicode test B code point 2090 ₐ that is not valid in cp1252')
�a_cp1252s�a_cp1252.py
                                # coding=cp1252
                                # 0xe2 is not allowed in utf8
                                print('CP1252 test P�t�')
                                import b_utf8
u�b_utf8.py
                                # use the default of utf8
                                print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
�utf-8c
CsXtj�|�}zt�|�Wnty&}z
|jtjkr�WYd}~nd}~wwt|d�S)N�wb)�os�path�dirname�makedirs�OSError�errno�EEXIST�open)rr�e�r$�-/usr/lib/python3.10/test/test_modulefinder.py�	open_file%s���
r&cCs�d}zM|��D]=}t|�tkr|�d�}|�d�s|�d�r(|�|��d�q|r.|��t|�tkr9|�d�}t	t
j�t
|����}qW|rN|��dSdS|rW|��ww)Nr� �	�
)�
splitlines�type�bytes�encode�
startswith�write�strip�close�decoder&rr�join�TEST_DIR)�source�ofi�liner$r$r%�create_package/s$

��
�r8c@s�eZdZddgejfdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S)(�ModuleFinderTestFrc	Cs�|\}}}}	}
t|
�z=|t||d�}|�|�|r|��tt|��}t|j�}|�||�|��\}
}|�|
|�|�||	�Wt	�
t�dSt	�
t�w)N)r�debug�
replace_paths)r8�	TEST_PATH�import_hook�report�sorted�set�modules�assertEqual�any_missing_maybe�shutil�rmtreer4)�self�infor>r:r;�modulefinder_class�import_thisrA�missing�
maybe_missingr5�mf�found�bad�mayber$r$r%�_do_testBs �


zModuleFinderTest._do_testcC�|�t�dS�N)rP�package_test�rFr$r$r%�test_package`�zModuleFinderTest.test_packagecCrQrR)rP�
maybe_testrTr$r$r%�
test_maybecrVzModuleFinderTest.test_maybecCrQrR)rP�maybe_test_newrTr$r$r%�test_maybe_newfrVzModuleFinderTest.test_maybe_newcCrQrR)rP�absolute_import_testrTr$r$r%�test_absolute_importsirVz&ModuleFinderTest.test_absolute_importscCrQrR)rP�relative_import_testrTr$r$r%�test_relative_importslrVz&ModuleFinderTest.test_relative_importscCrQrR)rP�relative_import_test_2rTr$r$r%�test_relative_imports_2orVz(ModuleFinderTest.test_relative_imports_2cCrQrR)rP�relative_import_test_3rTr$r$r%�test_relative_imports_3rrVz(ModuleFinderTest.test_relative_imports_3cCrQrR)rP�relative_import_test_4rTr$r$r%�test_relative_imports_4urVz(ModuleFinderTest.test_relative_imports_4cCrQrR)rP�syntax_error_testrTr$r$r%�test_syntax_errorxrVz"ModuleFinderTest.test_syntax_errorcCrQrR)rP�same_name_as_bad_testrTr$r$r%�test_same_name_as_bad{rVz&ModuleFinderTest.test_same_name_as_badcCs�tj�td�}|tjjd}|tjjd}t|��}|�	d�
d��Wd�n1s.wYtj||d�t�
|�|�t�dS)Nrrztesting_modulefinder = True
r)�cfile)rrr3r4�	importlib�	machinery�SOURCE_SUFFIXES�BYTECODE_SUFFIXESr&r/r-�
py_compile�compile�removerP�
bytecode_test)rF�	base_path�source_path�
bytecode_path�filer$r$r%�
test_bytecode~s
�
zModuleFinderTest.test_bytecodecCs�tj�tdd�}tj�tdd�}t���}|jtd||fgd�Wd�n1s*wY|��}d||f}|�	||�dS)Nrz	module.pyzspam.py�)r:r;zco_filename %r changed to %r)
rrr3r4r�captured_stdoutrPrW�getvalue�assertIn)rF�old_path�new_path�output�expectedr$r$r%�test_replace_paths�s
��z#ModuleFinderTest.test_replace_pathscCs,dddgggdttd��g}|�|�dS)NrrzVa.py
                                %r
                                import b
b.py
i)�list�rangerP)rF�extended_opargs_testr$r$r%�test_extended_opargs�s
��
z%ModuleFinderTest.test_extended_opargscCrQrR)rP�coding_default_utf8_testrTr$r$r%�test_coding_default_utf8�rVz)ModuleFinderTest.test_coding_default_utf8cCrQrR)rP�coding_explicit_utf8_testrTr$r$r%�test_coding_explicit_utf8�rVz*ModuleFinderTest.test_coding_explicit_utf8cCrQrR)rP�coding_explicit_cp1252_testrTr$r$r%�test_coding_explicit_cp1252�rVz,ModuleFinderTest.test_coding_explicit_cp1252cCs$Gdd�dtj�}|jt|d�dS)Ncs(eZdZ�fdd�Z�fdd�Z�ZS)zAModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApicst�j|i|��dSrR)�super�__init__)rF�args�kwds��	__class__r$r%r��szJModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.__init__cs|\}}}t��||||�SrR)r��load_module)rF�fqname�fp�pathname�	file_info�suffix�moder+r�r$r%r��s
zMModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.load_module)�__name__�
__module__�__qualname__r�r��
__classcell__r$r$r�r%�CheckLoadModuleApi�sr�)rH)�modulefinder�ModuleFinderrPr[)rFr�r$r$r%�test_load_module_api�s	z%ModuleFinderTest.test_load_module_apiN)r�r�r�r�r�rPrUrXrZr\r^r`rbrdrfrhrvrr�r�r�r�r�r$r$r$r%r9As&


r9�__main__)&rr �importlib.machineryrjrnrD�unittest�tempfile�testrr��mkdtempr4rr�__file__r<rWrYrSr[r]r_rarcrqrergr�r�r-r�r&r8�TestCaser9r��mainr$r$r$r%�<module>s�����!�%	�(��
�	������
s�

Youez - 2016 - github.com/yon3zu
LinuXploit