python (3.12.0)

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

͑e"ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
mZmZej sej"ddZGddej&Zej*ed	Gd
dej&ZGdd
ej&ZdZedk(rej4yy)N)support)	os_helper)spawn_pythonkill_pythonassert_python_okassert_python_failure interpreter_requires_environmentztest module requires subprocessc@t|}|j}||fSN)rwait)pdata
returncodes   F/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_cmd_line.py_kill_python_and_exit_coders!q>DJcfeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Ze
jeddZd
ZdZdZdZdZdZe
j.ej2ddZe
j.ej2ddZe
jej:dk(ddZe
jej:dk(ddZe
j.ej:dk(xse jBddZ"dZ#dZ$dZ%d Z&e
jejNjPd!d"Z)d#Z*d$Z+d%Z,d&Z-d'Z.d(Z/d)Z0d*Z1e
je2jfd+k7d,e
jej:d-k(d.d/Z4d0Z5d1Z6d2Z7d3Z8d4Z9d5Z:d6Z;e
jed7d8Z<d9Z=d:Z>d;d;d<d=Z?d>Z@dId?ZAd@ZBdAZCdBZDdCZEe
j.ej:dk(dDdEZFdFZGdGZHyH)JCmdLineTestc0tdtdy)N.z< .)rselfs rtest_directorieszCmdLineTest.test_directoriessc"e$rct|\}}}|j|dk(xs|jd|jd||jd||S)Nr
s	Traceback)r
assertTrueendswithassertNotIn)rcmd_linercouterrs     rverify_valid_flagzCmdLineTest.verify_valid_flag"sU'1Cs
9cll5&9:s+s+
rc2|jd|jd|jd}|j}|jd|d|jd||jd||j	t|dy)	Nz-hz-?z--helpusager
PYTHONHOME-X dev2)r#
splitlinesassertInr
assertLesslenrr!liness   r	test_helpzCmdLineTest.test_help)s~t$t$$$X. 

ha),C(E
B'rcJ|jd}|jd|y)Nz
--help-envr&r#r*rr!s  r
test_help_envzCmdLineTest.test_help_env3s $$\2

mS)rcJ|jd}|jd|y)Nz--help-xoptionsr'r1r2s  rtest_help_xoptionszCmdLineTest.test_help_xoptions7s!$$%67

i%rc|jd}|j}|jd|d|jd||jd|dj|ddj	dy)	Nz
--help-allr%rr&r'rascii)r#r)r*joindecoder-s   r
test_help_allzCmdLineTest.test_help_all;sk$$\2 

ha)

mS)

i%	qr""7+rcH|jd|jdy)Nz-Oz-OOr#rs r
test_optimizezCmdLineTest.test_optimizeFst$u%rc&|jdy)N-Sr=rs rtest_site_flagzCmdLineTest.test_site_flagJst$rcdtjddzjd}dD]Q}t|\}}}|j	|j||j
|j|Sy)NzPython %d.%dr8)z-Vz	--versionz-VV)sysversion_infoencoderassertFalse
startswithr)rversionswitchr r!r"s      rtest_versionzCmdLineTest.test_versionMso!C$4$4Ra$88@@I.	5F+F3LBSS^^G45OOCNN734	5rctd\}}}|jd|td\}}}|jd|y)Nz-vsstack overflowz-vv)rrrr r!r"s    rtest_verbosezCmdLineTest.test_verboseTsF(-C*C0'.C*C0rz6Cannot run -E tests when PYTHON env vars are required.cxd}|}|j|i|dd}|j|dddy)Nctjdf|z}|dz
}tj|}t	|jd}|S)N-E)-c import sys; print(sys._xoptions)r)rD
executable
subprocesscheck_outputevalr))argsr!optss   rget_xoptionsz/CmdLineTest.test_xoptions.<locals>.get_xoptions`sMNND)D0D>>D))$/C(+,DKrz-Xaz	-Xb=c,d=eTzc,d=e)ab)assertEqual)rrZrYs   r
test_xoptionszCmdLineTest.test_xoptions]sA	~r"E;/T89rc\fd}d}|d|\}}}j|jdj|d|dddd|\}}}j|jd	tjrj	|d
yj|dy)Ncltjg}|j|tj}tj
|||}|j
\}}|jj|jj|j}j|d|||fS)Nstdoutstderrr)rDrTextendrUPIPEPopencommunicaterbclosercrr])rXcmdrer
r!r"r rs       r
run_pythonz1CmdLineTest.test_showrefcount.<locals>.run_pythonps>>"CJJt??D  T$?A}}HC
HHNN
HHNNBR#sC<rrSrRs{}r-I-Xshowrefcounts{'showrefcount': True}s^\[-?\d+ refs, \d+ blocks\])r]rstriprPy_DEBUGassertRegex)rrjcoder r!r"s`     rtest_showrefcountzCmdLineTest.test_showrefcountos
	 2!$-Cu-c"!$ndDIC'@A
S"ABS#&rchd}|D][\}}dd|ddg}|j|5t|}|j|jj	d|ddd]y#1swYhxYw)N>z=onFrozenImporterz=offSourceFileLoaderru=rurlfrozen_modulesrRz,import os; print(os.__spec__.loader, end="")utf-8)subTestrrpr!r:)rtestsrawexpectedriress      rtest_xoption_frozen_modulesz'CmdLineTest.test_xoption_frozen_moduless
#	DMC>#/GICc"
D&,  !8(C
D
D	D
D
Ds4A&&A/	chtdtddtdddtddddy)N-m
fnord43520xyzrunpytimeit-n1rrrs rtest_run_modulezCmdLineTest.test_run_modules2	d#dO4	dG_=xs3rc0tddddd}|jjd|jjdt|}|j	|jdd	k7|j	|jd
d	k7y)N-irrrrsTimer
exit()
s1 loops__main__.Timer)rstdinwriterrfind)rr
rs   rtest_run_module_bug1764407z&CmdLineTest.test_run_module_bug1764407st
tXtS9	

j!	

k"1~		),23		"34:;rctjjtj	d}tj|5tdddtddddddy#1swYyxYw)Ntestrunittestztest/test_longexp.pyz./test/test_longexp.py)ospathdirname__file__removesuffixr
change_cwdr)rprojectlibpaths  rtest_relativedir_bug46421z%CmdLineTest.test_relativedir_bug46421sb2??G

!
!.
1	IT:/EFT:/GH	I	I	IsA,,A5cJtdtddtddy)NrRzraise Exceptionpassrrs r
test_run_codezCmdLineTest.test_run_codes!	d#d$56v&rzneed os_helper.FS_NONASCIIcxdtjdttjd}td|y)Nzassert(ord(z) == )rR)rFS_NONASCIIordr)rcommands  rtest_non_asciizCmdLineTest.test_non_asciis, ++S1F1F-GIw'rctj}d|d}td|}|j|jjt
|jdy)Nz# coding: latin1
print(ascii('z'))rRr8)rrrr]r!rnr8rF)rchrirs    rtest_codingzCmdLineTest.test_codingsS
"
"/t37tS))59+;+;G+DErwin32z Windows has a native unicode APIcd}tjj}d|d<d|d<d|zdz}tjt
jd|gtjtj|	}|j\}}|jd
k(rd}n-|jdk(rd
}ntd|jd||j|st|d|y)NCLC_ALL0PYTHONCOERCECLOCALEsimport locale; print(ascii("s"), locale.getencoding())rR)rbrcenvr7s3Unable to decode the command from the command line:rs'\xff' zUnknown exit code: z	, output=z doesn't start with )
renvironcopyrUrfrDrTreSTDOUTrgrAssertionErrorrH)rundecodablerrqr
rbrcpatterns        rtest_undecodable_codez!CmdLineTest.test_undecodable_codesjjooH
%(!"
*
+.)
)	


^^T4(??:+<+<
<<1
MG
\\Q
"G!q||U[!\]]  ) vw!OPP*rc	>
d

fd}
fd}
fd}djd}d}||g}|||fD]`}|j|5|D]=}||}	|j|	jj	t|?	dddby#1swYmxYw)	Nz;import sys, os; s=os.fsencode(sys.argv[1]); print(ascii(s))cxtjd|g}tj|tjdS)NrRTrbtextrDrTrUrunreargrirqs  rrun_defaultz6CmdLineTest.test_invalid_utf8_arg.<locals>.run_defaults,>>4s3C>>#jooDIIrctjd|g}ttj}d|d<tj|t
jd|S)NrRrrT)rbrr)rDrTdictrrrUrre)rrirrqs   rrun_c_localez7CmdLineTest.test_invalid_utf8_arg.<locals>.run_c_localesJ>>4s3Crzz"CCM>>#joo'+6
6rc|tjddd|g}tj|tjdS)Nrlutf8rRTrrrs  r
run_utf8_modez8CmdLineTest.test_invalid_utf8_arg.<locals>.run_utf8_modes0>>4tSAC>>#jooDIIre:é, euro:€, non-bmp:􏿿r}sé)run_cmd)rFr~r]rbrnr8)rrrr
valid_utf8invalid_utf8	test_argsrrprocrqs          @rtest_invalid_utf8_argz!CmdLineTest.test_invalid_utf8_argsM	J	6	J?EEgN

(	 .	#\=A	GGg.
G$GC"3<D$$T[[%7%7%95:FG
G
G	G
G
Gs
ABB	darwinz%test specific to Mac OS X and Androidcdjd}d}|jdd}t|jddz}tjj}d|d<t
jtjd	||ftj|
}|j\}}|j|||j|jdy)Nrr}z%import sys; print(ascii(sys.argv[1]))surrogateescaper8rrrrR)rbrr)rFr:r8rrrrUrfrDrTrergr]r)	rrrqdecodedrrr
rbrcs	         rtest_osx_android_utf8z!CmdLineTest.test_osx_android_utf8(s9??H6++g'89>((1E9jjooH

^^T4.??
*q)rctjd}tjd|g}t	j
|tjtjdd}|j|jdy)Nz
            import sys
            out = sys.stdout
            print(out.isatty(), out.write_through, out.line_buffering)
            err = sys.stderr
            print(err.isatty(), err.write_through, err.line_buffering)
        rRT)rbrcrcheckz#False False False
False False True
)	textwrapdedentrDrTrUrrer]rb)rrqrXrs    r%test_non_interactive_output_bufferingz1CmdLineTest.test_non_interactive_output_buffering>sb 
d+~~d:??%/__4tM.	/rcdD]l}d|z}tdd|\}}}|dk(r|n|}|j|dd|zd|z}tdd|\}}}|dk(r|n|}|j|dd	|zny)
Nraz6import os, sys; sys.%s.buffer.write(b'x'); os._exit(0)-urRrcxzbinary %s not unbufferedz.import os, sys; sys.%s.write('x'); os._exit(0)ztext %s not unbufferedrr])rstreamrqr r!r"rs       rtest_unbuffered_outputz"CmdLineTest.test_unbuffered_outputMs*	LFLD+D$=LBS H,3#DT4)Cf)LMDD+D$=LBS H,3#DT4)AF)JK	Lrcd}tdd|}|jjd|jjt	|\}}|j|d|j
|jd|y)Nz/import sys; sys.stdout.write(sys.stdin.read(1))rrRrr)rrrflushrr]rrH)rrqr
rr s     rtest_unbuffered_inputz!CmdLineTest.test_unbuffered_input]sgAtT*	

d	

-a0bQ-t4rcd}d}|tjz|z}d}tdd||\}}}|j|j	d||j|j	d|y)NABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJFGHIJif 1:
            import sys
            path = ":".join(sys.path)
            path = path.encode("ascii", "backslashreplace")
            sys.stdout.buffer.write(path)r@rR
PYTHONPATHr8)rpathseprr*rF)rpath1path2rrqr r!r"s        rtest_large_PYTHONPATHz!CmdLineTest.test_large_PYTHONPATHgsorzz!E)-
(dD379C

ell7+S1

ell7+S1rz'PYTHONSAFEPATH changes default sys.pathctd}td|d\}}}td|d\}}}|j||y)NrrRryrF)
__isolatedr)rrqrc1out1err1rc2out2err2s        r test_empty_PYTHONPATH_issue16309z,CmdLineTest.test_empty_PYTHONPATH_issue16309vsE-
+4"ET4*4%HT4	
t$rcdD]}tjj}||d<tjt
jdgtjtjtj|}d}|jjt|jddz|jjdt|}t|j|d	}|j||y)
N)r8zlatin-1r}PYTHONIOENCODINGr)rrbrcrua=é b= c=𐀀 d=􏿿r8rrbackslashreplace)rrrrUrfrDrTrerrrr8rFrreprr*)rencodingrr
rrescapeds       rtest_displayhook_unencodablez(CmdLineTest.test_displayhook_unencodables5	)H**//#C&.C"#  & oo!!((A?D
GGMM%+,,W5=>
GGMM+&q>D4j''2DEGMM'4(	)rctjd5}tjj	d}|j|j
d|j|jdtjtjd|f|tj5}|j\}}dddddd|jj!|y#1swY2xYw#1swY6xYw)Nzwb+ASCII)sabcsdefrrR)rrb)tempfileNamedTemporaryFilerlineseprFrr9rseekrUrfrDrTrergr]rn)rrqrrseprrbrcs        rcheck_inputzCmdLineTest.check_inputs

(
(
/	45**##G,CKK!123KKMJJqM!!t,JOO5
48<!%!1!1!3
4	4	
(3	
4
4	4	4s$BC?.C3C?3C<	8C??Dc(|jddy)Nz-import sys; print(repr(sys.stdin.readline()))s'abc\n'rrs rtest_stdin_readlinezCmdLineTest.test_stdin_readlines	
;	rc(|jddy)Nzprint(repr(input()))s'abc'rrs rtest_builtin_inputzCmdLineTest.test_builtin_inputs"	rcd}td|\}}}tjdk(r%|jd||jd|y|jd||jd|y)Nzif 1:
            import sys
            print(1)
            print(2)
            print(3, file=sys.stderr)
            print(4, file=sys.stderr)rRrs1
2
s3
4
s1
2
s3
4
)rrDplatformr]rrqr r!r"s     rtest_output_newlinezCmdLineTest.test_output_newlinesi)(d3C<<7"]C0]C0Y,Y,rctdd\}}}|j|jddd|jd|y)NrR'r8ignoreSyntaxErrorr)rrpr:r]rMs    rtest_unmached_quotezCmdLineTest.test_unmached_quotesA-T37CGX6
Fc"rcd}td|\}}}|jd||jd||j|jdddy)Nzif 1:
            import os, sys, test.support
            test.support.SuppressCrashReport().__enter__()
            sys.stdout.write('x')
            os.close(sys.stdout.fileno())rRrxr8rz"Exception ignored in.*
OSError: .*)rr]rpr:r
s     rtest_stdout_flush_at_shutdownz)CmdLineTest.test_stdout_flush_at_shutdowns\-
-T48Cc"b!GX6>	@rcLd}td|\}}}|jd|y)Nzimport sys; sys.stdout.close()rRrrr
s     rtest_closed_stdoutzCmdLineTest.test_closed_stdouts+0'd3Cc"rposixztest needs POSIX semanticsvxworksz.test needs preexec support in subprocess.Popencbdj}fd}tjtjdd|gtj
tj
tj
|}|j
\}}|j|d|j|jdy)	Nzif 1:
            import os, sys
            for i, s in enumerate({streams}):
                if getattr(sys, s) is not None:
                    os._exit(i + 1)
            os._exit(42)streamscdvrtjddvrtjddvrtjdyy)Nrrrbr7rcrC)rrhrsrpreexecz+CmdLineTest._test_no_stdio.<locals>.preexecsA'!7"7"#rrQrR)rrbrc
preexec_fnr*)	formatrUrfrDrTrergr]r)rrrqrr
r!r"s `     r_test_no_stdiozCmdLineTest._test_no_stdios
#F7F3	
	

^^T4.//????
 ==?Sc"r*rc(|jdgy)Nrr#rs r
test_no_stdinzCmdLineTest.test_no_stdinsWI&rc(|jdgy)Nrbr%rs rtest_no_stdoutzCmdLineTest.test_no_stdoutXJ'rc(|jdgy)Nrcr%rs rtest_no_stderrzCmdLineTest.test_no_stderrr)rc*|jgdy)N)rrbrcr%rs rtest_no_std_streamszCmdLineTest.test_no_std_streamss9:rc|jdg}tjjdddk7r"t	tj}|d=d|d<ni}tdD]8}d}t
d|fi|\}}}|j|d	|j|:tt|}|jt|d
dj|d
}t
d|d\}}}|jd|t
d|d\}}}|jd|t
d|d\}}}|jd|t
dd|d\}}}|jd|y)Nz-RPYTHONHASHSEEDrandomr
__cleanenvzprint(hash("spam"))rRrr7z83 runs produced an identical random hash  for "spam": {})msgz<import sys; print("random is", sys.flags.hash_randomization)ryr/srandom is 1rsrandom is 0)r#rrgetrrangerr]appendsortedset
assertGreaterr,r"r*)rhashesrirqr r!r"s        rtest_hash_randomizationz#CmdLineTest.test_hash_randomization
slt$
::>>*H5Arzz"C$% #CCq	A(D+D$>#>LBSR#MM#		
F$3v; 117		A
N'd2FC

nc*'d8LC

nc*'d3GC

nc*'dDMC

nc*rctj}|jtj|t	|dd5}td|td|dddt
|y#1swYxYw)Nwr}rz
import sys)filezdel sys.modules['__main__'])rTESTFN
addCleanupunlinkopenprintr)rfilenamescripts   rtest_del___main__zCmdLineTest.test_del___main__/se##	(((3
(C'
2	>f,V,/f=	>	"	>	>sA..A7ctdd\}}}|jd||j|jj	dd|jd|tdd\}}}|jd||j|jj	dd|jd|tddd\}}}|jd||jd||j|jj	dd|jd|y)	NrQz-zsUnknown option: -zr7r)withoutz-asUnknown option: -a)rr*r]r)countrrMs    rtest_unknown_optionsz CmdLineTest.test_unknown_options:s,T48C

+S1)//0EFJc"-T4@C

+S1)//0EFJc",T4FC

+S1.4)//0EFJc"r6Cannot run -I tests when PYTHON env vars are required.c|jd|jdtdddd\}}}|j|jdt	j
5}tjj|d}tjj|d	}t|d
d5}|jd
dddt|d
d5}|jd|jdddd|jtjtjtj d|g|tj"tjtj d|g|}|j|jddddy#1swYxYw#1swYxYw#1swYyxYw)Nrkz-IEPsrRz`from sys import flags as f; print(f.no_user_site, f.ignore_environment, f.isolated, f.safe_path)ry)dummyvars
1 1 1 Truezuuid.pyzmain.pyr?r}r@z)raise RuntimeError('isolated mode test')
zimport uuid
zprint('ok')
rQ)cwdrc)rQsok)r#rr]striprtemp_cwdrrr9rErassertRaisesrUCalledProcessErrorrVrDrTDEVNULL)rr r!r"tmpdirfakemainfs        rtest_isolatedmodezCmdLineTest.test_isolatedmodeLs	
t$w''d
S	C
	
m4



!	1V77<<	2D77<<	2DdC'2
FaDE
FdC'2
)a((
)
j;;(55"~~tT:%/%7%7

9))3>>4*F.46CSYY[%0	1	1
F
F
)
)	1	1s>*AG9F.G!#F:B!G.F7	3G:G	?GGcdD]Y\}}t||||}tt|}d|d|d}|j|5t	d|fi|ddd[y#1swYfxYw)N))ryr)rr7)rr7)2rC)PYTHONDEBUGPYTHONOPTIMIZEPYTHONDONTWRITEBYTECODE
PYTHONVERBOSEzimport sys; sys.stderr.write(str(sys.flags)); sys.exit(not (
                    sys.flags.debug == sys.flags.optimize ==
                    sys.flags.verbose ==
                    z:
                    and sys.flags.dont_write_bytecode == z
                )))envar_valuerR)rintboolr~r)rvaluerenv_varsdont_write_bytecoderqs      rtest_sys_flags_setzCmdLineTest.test_sys_flags_sethsI	9OE8!$(-#	H#&d5k"2
J::M9NO

%0
9 t8x8
9
9%	9$
9
9sA  A)	cdt}dddddd|dfg}|D]~\}}}|dnd|d	}d
|d}d|g}|ind
|i}	||urddg|ddn|
dd|g|dd|j||5tj5t	|i|	ddddddy#1swYxYw#1swYxYw)N)NNN)fooNrj)Nbarrk)rjrkrk)rjryNrjzis Nonez== ""z,import sys; sys.exit(not sys.pycache_prefix rrRPYTHONPYCACHEPREFIXrlpycache_prefixrzpycache_prefix=)envvalopt)objectr~rrSr)
rNO_VALUEcasesrorpr
exp_clauserqrXrs
          rtest_set_pycache_prefixz#CmdLineTest.test_set_pycache_prefixs8
  !
Hd#
&+	3!FC&.&6d8*A<NJA*QOD$<D"-BF,KCh "23Ra OC5"9:RaV5
3'')3$d2c23
3
3	333
3
3s$&B&;BB&B#B&&B/	T)check_exitcodexdevcttj}|jdd|jdd|jdd|rtj
ddg|}ntj
g|}t
j|tjtjd|}|r|j|jd||jjS)	NPYTHONWARNINGS
PYTHONDEVMODEPYTHONMALLOCrldevTrbrcuniversal_newlinesrr)rrrpoprDrTrUrrerr]rrbrn)rrvrwrXrrs      rrun_xdevzCmdLineTest.run_xdevs2:: $'&%NND%7$7DNN*T*D~~d%/__%/%6%615"%	'
T__a6{{!!##rcrd}|jd|d}|j|d|jd|}|j|dd}tjrd}nd	}|jd|}|j|||jd
d|}|j|d||jdd|}|j|d
||jdd|}|j|d|	ddl}d}tj
5|jd|d}dddtjrd}nd}|j||	ddl}d}|jd|}|j|dy#1swY`xYw#t$rYCwxYw#t$rYywxYw)N%import sys; print(sys.flags.dev_mode)rRF)rwFalseTruez\import warnings; print(' '.join('%s::%s' % (f[0], f[2].__name__) for f in warnings.filters))zdefault::Warningzdefault::Warning default::DeprecationWarning ignore::DeprecationWarning ignore::PendingDeprecationWarning ignore::ImportWarning ignore::ResourceWarningz-bzdefault::BytesWarning -bbzerror::BytesWarning z-Werrorzerror::Warning r<import _testcapi; print(_testcapi.pymem_getallocatorsname()))rvpymalloc_debugmalloc_debugz5import faulthandler; print(faulthandler.is_enabled()))	rr]rro	_testcapiSuppressCrashReport
with_pymallocImportErrorfaulthandler)rrqr!expected_filtersr
alloc_namers       r	test_xdevzCmdLineTest.test_xdevs6mmD$Um3g&mmD$'f%>1!:mmD$'./mmD$- 67G6HIJmmE4. 45E4FGHmmItT20@/ABC	.RD,,.
FmmD$umE
F$$&-
+
S*-	*KD--d+CS&)!
F
F					s0FF$F*F	F'&F'*	F65F6c|rd}nd}|dz
}tjd|dd|f}ttj}|jdd||d<t
j|tjtjd	|
}|j|jd||jjS)Nzimport sys; from test.support.import_helper import import_fresh_module; warnings = import_fresh_module('warnings', blocked=['_warnings']); zimport sys, warnings; zKprint(' '.join('%s::%s' % (f[0], f[2].__name__) for f in warnings.filters))z-WrrRrzryTr}r)rDrTrrrrrUrrerr]rrbrn)rcmdline_optionenvvar
use_pywarningrqrXrrs        rcheck_warnings_filtersz"CmdLineTest.check_warnings_filterssZD,D>	?neT4H2::& &~~d%/__%/%6%615"%	'
	
!T2{{!!##rcd}tjs|dz
}|jdd}|j|||jddd}|j||y)Nz9error::BytesWarning once::UserWarning always::UserWarningz default::DeprecationWarning ignore::DeprecationWarning ignore::PendingDeprecationWarning ignore::ImportWarning ignore::ResourceWarningzonce::UserWarningzalways::UserWarningT)r)rrorr])rrr!s   rtest_warnings_filter_precedencez+CmdLineTest.test_warnings_filter_precedences2";
<))*=*?A./))*=*?8<*>	
./rcd}ttj}|jdd|||d<n|jddtj
d|f}t
j|tjtjd|}|j|jj||j|jdy)Nrrzr{rRTr}r)rrrrrDrTrUrrerr]rbrnr)renv_varnamerqrrXrs       rcheck_pythonmalloczCmdLineTest.check_pythonmallocsM2::&")CGGND)d+~~d%/__%/%6%615"%	'
	
++-t4!,rcLtj}|rtjrdnd}d}ntjrdnd}d}d|fd|fddg}|r|jd|D]3\}}|j	||	5|j||ddd5y#1swY@xYw)
Nrpymallocrmallocdebug)rr)rr))rr)rr)rr)rrrordr~r)rrdefault_namedefault_name_debugrrrs       rtest_pythonmalloczCmdLineTest.test_pythonmalloc"s((*/6/?/?+ZL!1-4-=-=>8L!/< 
() ,	
LL

#	7MGTgD9
7''6
7
7	7
7
7s<BB#	cFd}ttj}|jddtj
d|f}t
j|tjd|}|j|jjd|j|jd|d|d<t
j|tjd|}|j|jjd	|j|jd|y)
NrrzrRT)rbr~rrrrr)
rrrrrDrTrUrrer]rbrnr)rrqrrXrs     rtest_pythondevmode_envz"CmdLineTest.test_pythondevmode_env<s62::&d+~~d:??153@++-w7!T2"O~~d:??153@++-v6!T2rz!bpo-32457 only applies on Windowscttjddf}tjj	tj\}}|dz|z}tj|t
j|}|j|jd||j|jjdy)NrRzprint(0)z\.\.\.\)rbrTr0)rDrTrrsplitrUrrer]rrbrR)rrXprefixexerTrs      rtest_argv0_normalizationz$CmdLineTest.test_argv0_normalizationNs~~tZ/ggmmCNN3m+c1
~~d:??)35!T2**,d3rc:tjddg}tj|tjtjd}d}|j|jj||j|j|jdy)Nrkz--unknown-optionT)rbrcrz'unknown option --unknown-option
usage: r)
rDrTrUrrerrcrHassertNotEqualr)rrXrerr_msgs    rtest_parsing_errorzCmdLineTest.test_parsing_errorZsp&89~~d%/__%/__#')=..w7EDOOQ/rcd}tddd|tddd|tddd|tddd|dtd|d	td|d
d}td|}tj}|j	||||ftddd|}|j	||d
tddd|}|j	||dtddd|}|j	||dtd|d}|j	||d
td|d}|j	||dtddd|d}|j	||dy)NzMimport sys; print(sys.flags.int_max_str_digits, sys.get_int_max_str_digits())rlint_max_str_digitsrRzint_max_str_digits=foozint_max_str_digits=1004000)PYTHONINTMAXSTRDIGITSrj100c|jjjd}td|j	DS)Nr}c32K|]}t|ywr)rc).0r<s  r	<genexpr>zGCmdLineTest.test_int_max_str_digits.<locals>.res2int.<locals>.<genexpr>rs5AQ5s)r!rRr:tupler)rr!s  rres2intz4CmdLineTest.test_int_max_str_digits.<locals>.res2intps3''--/((1C5555rzint_max_str_digits=0)rrzint_max_str_digits=4000)rzint_max_str_digits=100000)順rrzint_max_str_digits=6000)pr)rrrDget_int_max_str_digitsr])rrqrrcurrent_maxs     rtest_int_max_str_digitsz#CmdLineTest.test_int_max_str_digitsds}^d$8$Ed$<dDId$<dDId$8$4:	<	dDFdDF	6tT*002['ABt%;T4Hv.t%>dK|4t%@$M'78tTEv.tTH|4+T4"(
	
|4rN)F)I__name__
__module____qualname__rr#r/r3r5r;r>rArKrNrskipIfr	r^rrrrrrr
skipUnlessrrrrrDrrrr
is_androidrrrrrflags	safe_pathrrrrr
rrrrrrr#r&r(r+r-r=rIrMr[rhrurrrrrrrrrrrrrrs%(*&	,&%51X__57MO:O: '>D
4	<I'X..0LM(N(X..0LMFNFX__S\\W,79Q9QBX__S\\W,79(G9(GTX#,,(2#""%LN*N*(
/L 5
2X__SYY((>@%@%")$
4-"#@#X__RWW')EFX__S\\Y.IK+KG+0'((;#+J	##$X__57MO1O149.34.2$&9*v$*0*-"743$X0<>4>40"5rrrNc$eZdZdZdZdZdZy)IgnoreEnvironmentTestc@dj|}tdd|fi|S)Nz@import sys; sys.stderr.write(str(sys.flags)); sys.exit(not ({}))rQrR)r"r)r	predicaterfrqs    rrun_ignoring_varsz'IgnoreEnvironmentTest.run_ignoring_varss*
RXXYbcdD=H==rcLd}|jdj||y)Nshould_be_ignoredz'{}' not in sys.pathr)rr")rrs  rtest_ignore_PYTHONPATHz,IgnoreEnvironmentTest.test_ignore_PYTHONPATHs+"5<<TB*.		0rc*|jddy)Nz!sys.flags.hash_randomization == 1rr4rrs rtest_ignore_PYTHONHASHSEEDz0IgnoreEnvironmentTest.test_ignore_PYTHONHASHSEEDsB.1		3rc6d}|j|dddddy)Nz
            (sys.flags.debug == sys.flags.optimize ==
             sys.flags.dont_write_bytecode ==
             sys.flags.verbose == sys.flags.safe_path == 0)
        r)r^r_r`raPYTHONSAFEPATHr)rexpected_outcomes  rtest_sys_flags_not_setz,IgnoreEnvironmentTest.test_sys_flags_not_sets1
	
$'
		
rN)rrrrrrrrrrrrs>0
3
rrceZdZdZdZdZy)SyntaxErrorTestsc6tjtjdg|tjtj}|j|jd|j|jd|jd|jy)N-)inputrbrcrs
SyntaxError)	rUrrDrTrerrrcr*)rrqrs   rcheck_stringzSyntaxErrorTests.check_stringsf~~s~~s34%/__Z__NDOOQ/DKK.

&4rc&|jdy)Ns(1+2+3rrs rtest_tokenizer_error_with_stdinz0SyntaxErrorTests.test_tokenizer_error_with_stdins)$rc&|jdy)Ns'\u1f'rrs r*test_decoding_error_at_the_end_of_the_linez;SyntaxErrorTests.test_decoding_error_at_the_end_of_the_lines*%rN)rrrrrrrrrrrs5%&rrc,tjyr)r
reap_childrenrrrtearDownModulersr__main__)rrUrDrrrrrtest.supportrtest.support.script_helperrrrrr	has_subprocess_supportSkipTestrTestCaserrrrrrrYrrr<module>rs


"
%%
(

=
>>i
5(##i
5X13IK!
H--!
K!
H&x((&zHMMOr