python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_modulefinder.cpython-312.pyc

Αe0ddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
dgddgdgdgZdgddgdgd	gZdgd
ddggdgZ
dgd
ddggdgZdgdggdgZdgdggdgZdddgdggdgZdddgggdgZddgggdgZdgddggdgZdgddggdgZdddgggd gZdddgggd!gZd"d"dgggd#d$j1d%zgZd&Zd'ZGd(d)ej8Zed*k(rej>yy)+N)supporta.module)arsysbczb.somethingza/__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 *
)ra.bza.crmymodulerblahblahamymodule.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	rgczajmymodule.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.ya.b.za.b.c
a.b.c.moduleCa.b.c.da.b.c.ea.b.xr
amymodule.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.anotheramymodule.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.barza/__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.moduleza/__init__.py
a/module.py
                                import b.module
b/__init__.py
b/module.py
                                ?  # SyntaxError: invalid syntax
)rrrzb.cza/__init__.py
a/module.py
                                import c
                                from b import c
b/__init__.py
b/c.py
a_utf8b_utf8ua_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_cp1252sa_cp1252.py
                                # coding=cp1252
                                # 0xe2 is not allowed in utf8
                                print('CP1252 test Pt')
                                import b_utf8
ub_utf8.py
                                # use the default of utf8
                                print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
utf-8ctjj|}	tj|t|dS#t$r(}|j
t
jk7rYd}~8d}~wwxYw)Nwb)ospathdirnamemakedirsOSErrorerrnoEEXISTopen)rres   J/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_modulefinder.py	open_filer'"s^ggood#G
Gd77ell"#sA	A3A..A3c4d}	|jD]}t|tk7r|jd}|j	ds|j	dr#|j|j
dzk|r|jt|tk(r|jd}ttjj||j
}	|r|jyy#|r|jwwxYw)Nr 	
)
splitlinestypebytesencode
startswithwritestripclosedecoder'rrjoin)test_dirsourceofilines    r&create_packager:,s
C%%'
	FDDzU"{{7+t$(>		$**,./IIK:&;;w/DXtzz| DE
	FIIK3IIKsC)DDceZdZdZdZddgejfdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZy)ModuleFinderTestctj|_|jtjjtjg|_yN)tempfilemkdtempr6rrr__file__	test_pathselfs r&setUpzModuleFinderTest.setUp?s5 ((*
--9J9J)KLcBtj|jyr>)shutilrmtreer6rCs r&tearDownzModuleFinderTest.tearDownCs

dmm$rFFrc|\}}}}	}
t|j|
||j||}|j||r|j	tt
|}t|j}|j|||j\}
}|j|
||j||	y)N)rdebug
replace_paths)
r:r6rBimport_hookreportsortedsetmodulesassertEqualany_missing_maybe)rDinforOrLrMmodulefinder_classimport_thisrRmissing
maybe_missingr7mffoundbadmaybes               r&_do_testzModuleFinderTest._do_testFs?C<Wg}ft}}f-
T^^56CE
{#IIKW&rzz"())+
Ug&
.rFc.|jtyr>)r^package_testrCs r&test_packagezModuleFinderTest.test_packageas

l#rFc.|jtyr>)r^
maybe_testrCs r&
test_maybezModuleFinderTest.test_maybeds

j!rFc.|jtyr>)r^maybe_test_newrCs r&test_maybe_newzModuleFinderTest.test_maybe_newgs

n%rFc.|jtyr>)r^absolute_import_testrCs r&test_absolute_importsz&ModuleFinderTest.test_absolute_importsj

*+rFc.|jtyr>)r^relative_import_testrCs r&test_relative_importsz&ModuleFinderTest.test_relative_importsmrkrFc.|jtyr>)r^relative_import_test_2rCs r&test_relative_imports_2z(ModuleFinderTest.test_relative_imports_2p

,-rFc.|jtyr>)r^relative_import_test_3rCs r&test_relative_imports_3z(ModuleFinderTest.test_relative_imports_3srrrFc.|jtyr>)r^relative_import_test_4rCs r&test_relative_imports_4z(ModuleFinderTest.test_relative_imports_4vrrrFc.|jtyr>)r^syntax_error_testrCs r&test_syntax_errorz"ModuleFinderTest.test_syntax_errorys

'(rFc.|jtyr>)r^same_name_as_bad_testrCs r&test_same_name_as_badz&ModuleFinderTest.test_same_name_as_bad|s

+,rFctjj|jd}|tj
jdz}|tj
jdz}t|5}|jdjddddtj||tj||jty#1swYKxYw)Nrrztesting_modulefinder = True
r)cfile)rrr5r6	importlib	machinerySOURCE_SUFFIXESBYTECODE_SUFFIXESr'r1r/
py_compilecompileremover^
bytecode_test)rD	base_pathsource_path
bytecode_pathfiles     r&
test_bytecodezModuleFinderTest.test_bytecodesGGLL4	)"5"5"E"Ea"HH!I$7$7$I$I!$LL

{
#	HtJJ6==gFG	H;m<
		+

m$		H	Hs6!C!!C*ctjj|jdd}tjj|jdd}t	j
5}|j
td||fgdddj}d|d|}|j||y#1swY4xYw)Nrz	module.pyzspam.py)rLrMzco_filename z changed to )
rrr5r6rcaptured_stdoutr^rcgetvalueassertIn)rDold_pathnew_pathoutputexpecteds     r&test_replace_pathsz#ModuleFinderTest.test_replace_pathss77<<

sK@77<<

sI>

$
$
&	@&MM*A*2H)=(>

@	@"5=xH

h'	@	@s+B::Cc
bdddgggdttdzg}|j|y)NrrzVa.py
                                %r
                                import b
b.py
i)listranger^)rDextended_opargs_tests  r&test_extended_opargsz%ModuleFinderTest.test_extended_opargss@
#J

5<
		 	


*+rFc.|jtyr>)r^coding_default_utf8_testrCs r&test_coding_default_utf8z)ModuleFinderTest.test_coding_default_utf8s

./rFc.|jtyr>)r^coding_explicit_utf8_testrCs r&test_coding_explicit_utf8z*ModuleFinderTest.test_coding_explicit_utf8s

/0rFc.|jtyr>)r^coding_explicit_cp1252_testrCs r&test_coding_explicit_cp1252z,ModuleFinderTest.test_coding_explicit_cp1252s

12rFcdGddtj}|jt|y)Nc(eZdZfdZfdZxZS)AModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApic$t||i|yr>)super__init__)rDargskwds	__class__s   r&rzJModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.__init__s $/$/rFc4|\}}}t|||||Sr>)rload_module)	rDfqnamefppathname	file_infosuffixmoder-rs	        r&rzMModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.load_modules%%."dw*62xKKrF)__name__
__module____qualname__rr
__classcell__)rs@r&CheckLoadModuleApirs
0
L
LrFr)rV)modulefinderModuleFinderr^ri)rDrs  r&test_load_module_apiz%ModuleFinderTest.test_load_module_apis*	L!:!:	L	


*?Q
RrFN)rrrrErJrrr^rardrgrjrnrqrurxr{r~rrrrrrrrFr&r<r<>szM%%*"YeYrYr/6$"&,,...)-%(,013
SrFr<__main__) rr"importlib.machineryrrrHunittestr?testrrrcrfr`rirmrprtrwrrzr}rrr/rr'r:TestCaser<rmainrrFr&<module>rs	
$
EM?

 EM?
 6r	, r
B"J%P*I*
E
L"	!E2	

x	

x	F7O
	 $uSx((uSnzHMMOrF