python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_modulefinder.cpython-311.opt-2.pyc

e0ddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
dgddgdgdgZdgddgdgd	gZdgd
ddggdgZ
dgd
ddggdgZdgdggdgZdgdggdgZdddgdggdgZdddgggdgZddgggdgZdgddggdgZdgddggdgZdddgggd gZdddgggd!gZd"d"dgggd#d$d%zgZd&Zd'ZGd(d)ejZed*krejdSdS)+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-8ctj|}	tj|n-#t$r }|jt
jkrYd}~nd}~wwxYwt|dS)Nwb)ospathdirnamemakedirsOSErrorerrnoEEXISTopen)rres   J/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_modulefinder.py	open_filer'"sgood##G
G7el""#""""ds6
A AA cd}	|D]}t|tkr|d}|ds|dr+||dz|r|t|tkr|d}ttj||}		|r|dSdS#|r|wwxYw)Nr 	
)
splitlinestypebytesencode
startswithwritestripclosedecoder'rrjoin)test_dirsourceofilines    r&create_packager:,s>
C%%''
	F
	FDDzzU""{{7++t$$
F(>(>
F		$**,,.//// IIKKK::&&;;w//DXtzz|| D DEE
	F	IIKKKKK		3	IIKKKK	sDD<<EceZdZdZdZddgejfdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdS)ModuleFinderTestctj|_|jtjtjg|_dSN)tempfilemkdtempr6rrr__file__	test_pathselfs r&setUpzModuleFinderTest.setUp?s5 (**
-9J)K)KLc8tj|jdSr>)shutilrmtreer6rCs r&tearDownzModuleFinderTest.tearDownCs
dm$$$$$rFFrc|\}}}}	}
t|j|
||j||}|||r|tt
|}t|j}||||	\}
}||
||||	dS)N)rdebug
replace_paths)
r:r6rBimport_hookreportsortedsetmodulesassertEqualany_missing_maybe)rDinforOrLrMmodulefinder_classimport_thisrRmissing
maybe_missingr7mffoundbadmaybes               r&_do_testzModuleFinderTest._do_testFs?C<Wg}ft}f---

T^56CEEE
{###	IIKKKW&&rz""((())++
Ug&&&
.....rFc:|tdSr>)r^package_testrCs r&test_packagezModuleFinderTest.test_packageas

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

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

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

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

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

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

+,,,,,rFctj|jd}|tjjdz}|tjjdz}t|5}|	d
ddddn#1swxYwYtj||tj
||tdS)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_bytecodesGLL44	)"5"Ea"HH!I$7$I!$LL

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

m$$$$$s))BB"%B"ctj|jdd}tj|jdd}t	j5}|td||fgdddn#1swxYwY|}d|d|}|	||dS)Nrz	module.pyzspam.py)rLrMzco_filename z changed to )
rrr5r6rcaptured_stdoutr^rcgetvalueassertIn)rDold_pathnew_pathoutputexpecteds     r&test_replace_pathsz#ModuleFinderTest.test_replace_pathss7<<
sK@@7<<
sI>>

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

@
@
@	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@""5=XXxxH

h'''''s !B

BBc
|dddgggdttdzg}||dS)NrrzVa.py
                                %r
                                import b
b.py
i)listranger^)rDextended_opargs_tests  r&test_extended_opargsz%ModuleFinderTest.test_extended_opargssQ
#J

5<<
		 	


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

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

/00000rFc:|tdSr>)r^coding_explicit_cp1252_testrCs r&test_coding_explicit_cp1252z,ModuleFinderTest.test_coding_explicit_cp1252s

122222rFcnGddtj}|t|dS)Nc(eZdZfdZfdZxZS)AModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApic:tj|i|dSr>)super__init__)rDargskwds	__class__s   r&rzJModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.__init__s%  $/$/////rFcX|\}}}t||||Sr>)rload_module)	rDfqnamefppathname	file_infosuffixmoder-rs	        r&rzMModuleFinderTest.test_load_module_api.<locals>.CheckLoadModuleApi.load_modules-%."dww**62xKKKrF)__name__
__module____qualname__rr
__classcell__)rs@r&CheckLoadModuleApirsZ
0
0
0
0
0
L
L
L
L
L
L
L
L
LrFr)rV)modulefinderModuleFinderr^ri)rDrs  r&test_load_module_apiz%ModuleFinderTest.test_load_module_apisW	L	L	L	L	L!:	L	L	L	


*?Q
RRRRRrFN)rrrrErJrrr^rardrgrjrnrqrurxr{r~rrrrrrrrFr&r<r<>s\MMM%%%%*"YeYr////6$$$"""&&&,,,,,,.........)))---%%%(((,,,000111333
S
S
S
S
SrFr<__main__) rr"importlib.machineryrrrHunittestr?testrrrcrfr`rirmrprtrwrrzr}rrr/rr'r:TestCaser<rmainrrFr&<module>rs				



$


EM?

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

x	

x	F7OO
	 $uSuSuSuSuSx(uSuSuSnzHMOOOOOrF