Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_modulefinder.cpython-39.opt-1.pyc

a

��g�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,k�r�e�%�dS)-�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.crZmymodulerZblahblahamymodule.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	rr
rrrrza.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
Za_utf8Zb_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')
Za_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�|�Wn2tyL}z|jtjkr8�WYd}~n
d}~00t|d�S)N�wb)�os�path�dirname�makedirs�OSError�errno�EEXIST�open)rr�e�r�2/usr/local/lib/python3.9/test/test_modulefinder.py�	open_file%sr!cCs�d}z�|��D]z}t|�tkr(|�d�}|�d�s<|�d�rP|�|��d�q|r\|��t|�tkrr|�d�}t	t
j�t
|����}qW|r�|��n|r�|��0dS)Nr� �	�
)�
splitlines�type�bytes�encode�
startswith�write�strip�close�decoder!rr�join�TEST_DIR)�sourceZofi�linerrr �create_package/s 


�r2c@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|
�zx|t||d�}|�|�|r<|��tt|��}t|j�}|�||�|��\}
}|�|
|�|�||	�Wt	�
t�nt	�
t�0dS)N)r�debug�
replace_paths)r2�	TEST_PATHZimport_hook�report�sorted�set�modulesZassertEqualZany_missing_maybe�shutil�rmtreer/)�self�infor7r4r5�modulefinder_classZimport_thisr:�missingZ
maybe_missingr0Zmf�foundZbad�mayberrr �_do_testBs �


zModuleFinderTest._do_testcCs|�t�dS�N)rC�package_test�r=rrr �test_package`szModuleFinderTest.test_packagecCs|�t�dSrD)rC�
maybe_testrFrrr �
test_maybecszModuleFinderTest.test_maybecCs|�t�dSrD)rC�maybe_test_newrFrrr �test_maybe_newfszModuleFinderTest.test_maybe_newcCs|�t�dSrD)rC�absolute_import_testrFrrr �test_absolute_importsisz&ModuleFinderTest.test_absolute_importscCs|�t�dSrD)rC�relative_import_testrFrrr �test_relative_importslsz&ModuleFinderTest.test_relative_importscCs|�t�dSrD)rC�relative_import_test_2rFrrr �test_relative_imports_2osz(ModuleFinderTest.test_relative_imports_2cCs|�t�dSrD)rC�relative_import_test_3rFrrr �test_relative_imports_3rsz(ModuleFinderTest.test_relative_imports_3cCs|�t�dSrD)rC�relative_import_test_4rFrrr �test_relative_imports_4usz(ModuleFinderTest.test_relative_imports_4cCs|�t�dSrD)rC�syntax_error_testrFrrr �test_syntax_errorxsz"ModuleFinderTest.test_syntax_errorcCs|�t�dSrD)rC�same_name_as_bad_testrFrrr �test_same_name_as_bad{sz&ModuleFinderTest.test_same_name_as_badcCs�tj�td�}|tjjd}|tjjd}t|�� }|�	d�
d��Wd�n1s\0Ytj||d�t�
|�|�t�dS)Nrrztesting_modulefinder = True
r)�cfile)rrr.r/�	importlib�	machinery�SOURCE_SUFFIXES�BYTECODE_SUFFIXESr!r*r(�
py_compile�compile�removerC�
bytecode_test)r=�	base_path�source_path�
bytecode_path�filerrr �
test_bytecode~s
.
zModuleFinderTest.test_bytecodecCs�tj�tdd�}tj�tdd�}t���&}|jtd||fgd�Wd�n1sT0Y|��}d||f}|�	||�dS)Nrz	module.pyzspam.py�)r4r5zco_filename %r changed to %r)
rrr.r/rZcaptured_stdoutrCrH�getvalueZassertIn)r=Zold_path�new_path�outputZexpectedrrr �test_replace_paths�s
�$z#ModuleFinderTest.test_replace_pathscCs,dddgggdttd��g}|�|�dS)NrrzVa.py
                                %r
                                import b
b.py
i)�list�rangerC)r=Zextended_opargs_testrrr �test_extended_opargs�s
��
z%ModuleFinderTest.test_extended_opargscCs|�t�dSrD)rC�coding_default_utf8_testrFrrr �test_coding_default_utf8�sz)ModuleFinderTest.test_coding_default_utf8cCs|�t�dSrD)rC�coding_explicit_utf8_testrFrrr �test_coding_explicit_utf8�sz*ModuleFinderTest.test_coding_explicit_utf8cCs|�t�dSrD)rC�coding_explicit_cp1252_testrFrrr �test_coding_explicit_cp1252�sz,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|��dSrD)�super�__init__)r=�args�kwds��	__class__rr rw�szJModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.__init__cs|\}}}t��||||�SrD)rv�load_module)r=Zfqname�fp�pathname�	file_info�suffix�moder&rzrr r|�s
zMModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.load_module)�__name__�
__module__�__qualname__rwr|�
__classcell__rrrzr �CheckLoadModuleApi�sr�)r?)�modulefinder�ModuleFinderrCrL)r=r�rrr �test_load_module_api�s	z%ModuleFinderTest.test_load_module_apiN)r�r�r�r�r�rCrGrIrKrMrOrQrSrUrWrYrgrlrorqrsrur�rrrr r3As$


r3�__main__)&rrZimportlib.machineryr[r_r;Zunittest�tempfile�testrr��mkdtempr/rr�__file__r6rHrJrErLrNrPrRrTrbrVrXrprrr(rtr!r2ZTestCaser3r��mainrrrr �<module>s�����!�%	�(��
�	�������
s


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists