+
    Bi                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIH	t	 ^ RI
Ht ^ RI
Ht ]P                  ! R4       ^RIHt  ! R R	]4      t ! R
 R]4      t]R8X  d   ]P&                  ! 4        R# R# )    N)dedent)support)import_helper)	os_helper_interpreters)TestBasec                      a a ] tR t^t o^ t]P                  V 3R l4       tRR/R ltRt	Rt
R tR tR t]P                  ! 4       R	R/R
 l4       tR tRtVtV ;t# )StartupTestsc           	   '    <"   \         SV `  ! V!  ;_uu_ 4       pV ;P                  ^,          un         Vx  V P                  '       d+   V P                  ^8X  d   \	        RRR7       M\	        R4       RV n         RRR4       R#   T P                  '       d2   T P                  ^8X  d   \	        RRR7       RT n        i \	        R4       RT n        i ; i  + '       g   i     R# ; i5i)   z### end subtest debug ### )endFN)supersubTest_subtest_count_debugged_in_subtestprint)selfargsctx	__class__s   &* </usr/lib/python3.14/test/test_interpreters/test_lifecycle.pyr   StartupTests.subTest   s     W_d##s1$
2	,,,**a/ 9rB9:,1) $#
 ,,,**a/ 9rB -2) 9:,1) $##s4   C*CBAC=
C*ACCC'	!	C*headerNc                  V'       d   V P                  R V R24       V'       du   VP                  \        P                  4      '       d.   V P                  VR\	        \        P                  4      )  4       M"V P                  V4       V P                  R4       V P                  R4       R# V P                  V4       R# )z--- z ---Nz<no newline>------)_debugendswithoslineseplen)r   msgr   s   &&$r   debugStartupTests.debug(   s    KK$vhd+,<<

++KK$5c"**o%5 67KK$KK/KK!KK    Fc                    V P                   '       g   \        4        R V n         V P                  e3    V P                  '       g   R V n        \        R4       \        V4       R# \        V4       R# )TNz### start subtest debug ###)	_debuggedr   _subtestr   )r   r"   s   &&r   r   StartupTests._debug7   sO    ~~~G!DN==$00004D-78c
#Jr%   c                    ^ RI pVP                  RR7      p\        P                  P	                  V4      pV P                  \        P                  V4       V# )r   Ntest_interpreters_)prefix)tempfilemkdtempr   pathrealpath
addCleanupr   rmtree)r   r-   tmps   &  r   create_temp_dirStartupTests.create_temp_dirD   sF    &:;ggs#	((#.
r%   c               Z   \         P                  P                  ! V!  p\         P                  P                  V4      pV'       d   \         P                  ! VR R7       \        VRRR7      ;_uu_ 4       pVP                  \        V4      4       RRR4       V#   + '       g   i     T# ; i)T)exist_okwzutf-8)encodingN)r   r/   joindirnamemakedirsopenwriter   )r   textr/   filenamer;   outfiles   &$*   r   write_scriptStartupTests.write_scriptK   sp    77<<&''//(+KK$/(C'22gMM&,' 3 32s   4BB*	cwdc                  ^ RI p^ RIp\        V\        4      '       d   VP	                  V4      p\
        P                  .VOp VP                  VVRRR7      pTP                   ^ 8w  d|   \"        P$                  '       df   T P                  RTP                  TR	,          4       R
24       T P                  TP&                  RR7       T P                  TP(                  RR7       T P+                  TP                   ^ 4       T P+                  TP(                  R4       TP&                  #   \         d   pT P                  RTP                  T4       24       \        T\        4      '       da   TP                  '       gO   \        P                  P                  T^ ,          4      '       d   RpMRpT P                  T^ ,           RT 24       h Rp?ii ; i)r   NT)rD   capture_outputr?   z# cmd: existszdoes not exist z
# python3 :r   NNz failed:stdout)r   stderrr   )shlex
subprocess
isinstancestrsplitsys
executablerun	Exceptionr#   r:   FileNotFoundErrorr@   r   r/   rG   
returncoder   verboserI   rJ   assertEqual)r   argvrD   rK   rL   procexcrG   s   &&$     r   
run_pythonStartupTests.run_pythonT   sq    	dC  ;;t$D&&	>>#	 " D  ??aGOOOJJEJJtBx$8#9BCJJt{{8J4JJt{{8J4!,b){{!  	JJD!1 234#011#,,,77>>$q'**%F-F

d1gYax01	s%   D) )G4A
G?+G+#GGc                ,   R pV P                  4       pV P                  VRRRR7       V P                  VRRVR7       V P                  VRRVR7       V P                  VRVR7       RV3RV3RV3R	V3R.pV F  w  rEV P                  R
V 24      ;_uu_ 4        V P                  WBR7      p\        P
                  ! V4      pVR,          VR,          rV P                  W4       V P                  W4       RRR4       K  	  R#   + '       g   i     K  ; i)a  
            import sys
            from concurrent import interpreters

            orig = sys.path[0]

            interp = interpreters.create()
            interp.exec(f"""if True:
                import json
                import sys
                print(json.dumps({{
                    'main': {orig!r},
                    'sub': sys.path[0],
                }}, indent=4), flush=True)
                """)
            pkgz__init__.pyr   )r?   z__main__.pyz	script.pyz	-m scriptz-m pkgz-m pkg.scriptzpython3 )rD   mainsubN)z-c "import script"r   )r4   rB   r   r[   jsonloadsrW   )
r   scriptrD   casesrX   expectedoutdatasp0_mainsp0_subs
   &         r   test_sys_path_0StartupTests.test_sys_path_0v   s   , ""$#um"=#um&A#uk?#{8 ##sOc"&
 $ND/00oodo4zz#$(L$u+'  3  3 10 $000s   ADD)r'   r   )__name__
__module____qualname____firstlineno__r   
contextlibcontextmanagerr   r#   r'   r   r   r4   rB   r   requires_subprocessr[   rj   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r
   r
      s{     
 N2 24  I    "d  #B+4 +4r%   r
   c                   N   a  ] tR t^t o ]P
                  ! 4       R 4       tRtV tR# )FinalizationTestsc                   ^ RI p\        P                  RR.pVP                  VRRR7      pV P	                  RVP
                  4       VP                  ^ 8X  dg   \        P                  '       dQ   \        4        \        R4       \        RVP                   24       \        R	VP
                   24       \        R
4       V P                  VP                  ^4       R# )r   Nz-czif True:
            from concurrent import interpreters
            interp = interpreters.create()
            raise Exception
            T)rF   r?   	Tracebackz --- cmd unexpected succeeded ---zstdout:
zstderr:
r   )rL   rP   rQ   rR   assertInrJ   rU   r   rV   r   rI   rW   )r   rL   rX   rY   s   &   r   test_gh_109793 FinalizationTests.test_gh_109793   s     	 ' 
 ~~d4d~Ck4;;/??aGOOOG45Idkk]+,Idkk]+,(O!,r%    N)	rl   rm   rn   ro   r   rr   r|   rs   rt   )rv   s   @r   rx   rx      s        "- #-r%   rx   __main__)rp   ra   r   os.pathrP   textwrapr   unittesttestr   test.supportr   r   import_moduleutilsr   r
   rx   rl   r_   r~   r%   r   <module>r      sg      	  
    & "   O , P48 P4h- -. zMMO r%   