Sindbad~EG File Manager
�
'Μg�0����ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
Z
dgd�dgdgdgZdgd�dgdgd gZdgd
�ddggdgZ
dgd
�ddggdgZdgd�ggdgZdgd�ggdgZdddgdggdgZdddgggdgZddgggdgZdgd�dggdgZdgd�dggdgZdddgggd gZdddgggd!gZd"d"dgggd#d$j1d%�zgZd&�Zd'�ZGd(�d)ej8�Zed*k(rej>�yy)+�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.zr r�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
)r rrr
�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���tjj|�} tj|�t|d�S#t$r(}|j
t
jk7r�Yd}~�8d}~wwxYw)N�wb)�os�path�dirname�makedirs�OSError�errno�EEXIST�open)rr�es �3/usr/local/lib/python3.12/test/test_modulefinder.py� open_filer'"s^���g�g�o�o�d�#�G��
���G����d�������7�7�e�l�l�"��#���s�A� A3�A.�.A3c�4�d} |j�D]�}t|�tk7r|jd�}|j d�s|j d�r#|j|j
�dz��k|r|j�t|�tk(r|jd�}ttjj||j
���}�� |r|j�yy#|r|j�wwxYw)Nr� � �
)
�
splitlines�type�bytes�encode�
startswith�write�strip�close�decoder'rr�join)�test_dir�source�ofi�lines r&�create_packager:,s���
�C���%�%�'�D��D�z�U�"��{�{�7�+�����t�$�����(>�� � �$�*�*�,��.�/���I�I�K���:��&��;�;�w�/�D�������X�t�z�z�|� D�E��(���I�I�K���3��I�I�K��s�C)D�Dc��eZdZd�Zd�Zddgejfd�Zd�Zd�Z d�Z
d �Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�ModuleFinderTestc��tj�|_|jtjjtj�g|_y�N)�tempfile�mkdtempr6rrr�__file__� test_path��selfs r&�setUpzModuleFinderTest.setUp?s5�� �(�(�*��
��-�-�������9J�9J�)K�L���c�B�tj|j�yr>)�shutil�rmtreer6rCs r&�tearDownzModuleFinderTest.tearDownCs���
�
�d�m�m�$rFFrc��|\}}}} }
t|j|
�||j||��}|j|�|r|j �tt
|��}t|j�}|j||�|j�\}
}|j|
|�|j|| �y)N)r�debug�
replace_paths)
r:r6rB�import_hook�report�sorted�set�modules�assertEqual�any_missing_maybe)rD�inforOrLrM�modulefinder_class�import_thisrR�missing�
maybe_missingr7�mf�found�bad�maybes r&�_do_testzModuleFinderTest._do_testFs���?C�<��W�g�}�f��t�}�}�f�-�
�T�^�^�5�6C�E��
���{�#���I�I�K���W��&���r�z�z�"�������(��)�)�+�
��U�����g�&�����
�.rFc�.�|jt�yr>)r^�package_testrCs r&�test_packagezModuleFinderTest.test_packageas���
�
�l�#rFc�.�|jt�yr>)r^�
maybe_testrCs r&�
test_maybezModuleFinderTest.test_maybeds���
�
�j�!rFc�.�|jt�yr>)r^�maybe_test_newrCs r&�test_maybe_newzModuleFinderTest.test_maybe_newgs���
�
�n�%rFc�.�|jt�yr>)r^�absolute_import_testrCs r&�test_absolute_importsz&ModuleFinderTest.test_absolute_importsj����
�
�*�+rFc�.�|jt�yr>)r^�relative_import_testrCs r&�test_relative_importsz&ModuleFinderTest.test_relative_importsmrkrFc�.�|jt�yr>)r^�relative_import_test_2rCs r&�test_relative_imports_2z(ModuleFinderTest.test_relative_imports_2p����
�
�,�-rFc�.�|jt�yr>)r^�relative_import_test_3rCs r&�test_relative_imports_3z(ModuleFinderTest.test_relative_imports_3srrrFc�.�|jt�yr>)r^�relative_import_test_4rCs r&�test_relative_imports_4z(ModuleFinderTest.test_relative_imports_4vrrrFc�.�|jt�yr>)r^�syntax_error_testrCs r&�test_syntax_errorz"ModuleFinderTest.test_syntax_errorys���
�
�'�(rFc�.�|jt�yr>)r^�same_name_as_bad_testrCs r&�test_same_name_as_badz&ModuleFinderTest.test_same_name_as_bad|s���
�
�+�,rFc���tjj|jd�}|tj
jdz}|tj
jdz}t|�5}|jdjd��ddd�tj||��tj|�|jt�y#1swY�KxYw)Nrrztesting_modulefinder = True
r)�cfile)rrr5r6� importlib� machinery�SOURCE_SUFFIXES�BYTECODE_SUFFIXESr'r1r/�
py_compile�compile�remover^�
bytecode_test)rD� base_path�source_path�
bytecode_path�files r&�
test_bytecodezModuleFinderTest.test_bytecodes����G�G�L�L�����4� ��)�"5�"5�"E�"E�a�"H�H��!�I�$7�$7�$I�$I�!�$L�L�
�
�{�
#�t��J�J�6�=�=�g�F�G�$����;�m�<�
� � �+���
�
�m�$� $�
#�s�6!C!�!C*c��tjj|jdd�}tjj|jdd�}t j
�5}|j
td||fg��ddd�j�}d|�d|��}|j||�y#1swY�4xYw)Nrz module.pyzspam.py�)rLrMzco_filename z changed to )
rrr5r6r�captured_stdoutr^rc�getvalue�assertIn)rD�old_path�new_path�output�expecteds r&�test_replace_pathsz#ModuleFinderTest.test_replace_paths�s����7�7�<�<��
�
�s�K�@���7�7�<�<��
�
�s�I�>��
�
$�
$�
&�&��M�M�*�A�*2�H�)=�(>�
�
@�'����"��5=�x�H���
�
�h��'�'�
&�s�+B:�:Cc
�b�dddgggdttd��zg}|j|�y)NrrzVa.py
%r
import b
b.py
i)�list�ranger^)rD�extended_opargs_tests r&�test_extended_opargsz%ModuleFinderTest.test_extended_opargs�s@���
�#�J���
�
�5��<��
� ��
�
�
�*�+rFc�.�|jt�yr>)r^�coding_default_utf8_testrCs r&�test_coding_default_utf8z)ModuleFinderTest.test_coding_default_utf8�s���
�
�.�/rFc�.�|jt�yr>)r^�coding_explicit_utf8_testrCs r&�test_coding_explicit_utf8z*ModuleFinderTest.test_coding_explicit_utf8�s���
�
�/�0rFc�.�|jt�yr>)r^�coding_explicit_cp1252_testrCs r&�test_coding_explicit_cp1252z,ModuleFinderTest.test_coding_explicit_cp1252�s���
�
�1�2rFc�d�Gd�dtj�}|jt|��y)Nc�(��eZdZ�fd�Z�fd�Z�xZS)�AModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApic�$��t�|�|i|��yr>)�super�__init__)rD�args�kwds� __class__s �r&r�zJModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.__init__�s����� �$�/�$�/rFc�4��|\}}}t�|�||||�Sr>)r��load_module) rD�fqname�fp�pathname� file_info�suffix�moder-r�s �r&r�zMModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.load_module�s%���%.�"���d��w�*�6�2�x��K�KrF)�__name__�
__module__�__qualname__r�r��
__classcell__)r�s@r&�CheckLoadModuleApir��s���
0�
L�
LrFr�)rV)�modulefinder�ModuleFinderr^ri)rDr�s r&�test_load_module_apiz%ModuleFinderTest.test_load_module_api�s*�� L��!:�!:� L�
�
�
�*�?Q�
�RrFN)r�r�r�rErJr�r�r^rardrgrjrnrqrurxr{r~r�r�r�r�r�r�r��rFr&r<r<>sz��M�%�%*��"�Ye�Yr�Yr�/�6$�"�&�,�,�.�.�.�)�-�%�(�,�0�1�3�
SrFr<�__main__) rr"�importlib.machineryr�r�rH�unittestr?�testrr�rcrfr`rirmrprtrwr�rzr}r�r�r/r�r'r:�TestCaser<r��mainr�rFr&�<module>r�s�� ����
�����$�
��E�M�?��
�
� ���E�M�?��
�� �6����r�� ��,� ����r��
��B�����"��J�����%��P��*���I�������*�����
����E�����
����L�"�� ���!��E�2�� ��
�
�x����� ��
�
�x����� �����������F�7�O�
� �� ��$uS�x�(�(�uS�n�z���H�M�M�O�rF
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists