+
    -IëjL$  ã                   óˆ   € ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIHt ^ RIt^ RIt^ RI	t	^ RI
t
 ! R R]	P                  4      tR# )é    N)ÚPopen)Úmkdtempc                   óT   a € ] tR t^t o R tR tRR ltR tR tR t	R t
R	 tR
tV tR# )ÚAutoreloadTestc                óX   € R V n         \        4       V n        V P                  RR/4       R# )i   zrun_twice_magic.pya‘  
                    import os
                    import sys

                    import tornado.autoreload

                    sys.stdout.flush()

                    if "TESTAPP_STARTED" not in os.environ:
                        os.environ["TESTAPP_STARTED"] = "1"
                        tornado.autoreload._reload()
                    else:
                        os._exit(0)
                N)ÚmaxDiffr   ÚpathÚwrite_files©Úselfs   &Ú>/usr/lib/python3/dist-packages/tornado/test/autoreload_test.pyÚsetUpÚAutoreloadTest.setUp   s/   € àˆŒä“IˆŒ	ð 	×Ñà$ð 'ðö	
ó    c                óØ   €  \         P                  ! V P                  4       R#   \         d;    \        P
                  ! ^4       \         P                  ! T P                  4        R# i ; i)é   N)ÚshutilÚrmtreer	   ÚOSErrorÚtimeÚsleepr   s   &r   ÚtearDownÚAutoreloadTest.tearDown.   sC   € ð		%Ü�MŠM˜$Ÿ)™)Ö$øÜô 	%ô �JŠJ�qŒMÜ�MŠM˜$Ÿ)™)×$ð	%ús   ‚ $ ¤AA)Á(A)Nc                ó6  € Vf   V P                   pVP                  4        Fà  w  r4\        V\        4      '       de   \        P
                  ! \        P                   P                  W#4      4       V P                  V\        P                   P                  W#4      4       K  \        \        P                   P                  W#4      RRR7      ;_uu_ 4       pVP                  \        P                  ! V4      4       RRR4       Kâ  	  R#   + '       g   i     K÷  ; i)zŒWrite a directory tree to self.path.

tree is a dictionary mapping file names to contents, or
sub-dictionaries representing subdirectories.
NÚwúutf-8)Úencoding)r	   ÚitemsÚ
isinstanceÚdictÚosÚmkdirÚjoinr
   ÚopenÚwriteÚtextwrapÚdedent)r   ÚtreeÚ	base_pathÚnameÚcontentsÚfs   &&&   r   r
   ÚAutoreloadTest.write_files:   s²   € ð ÒØŸ	™	ˆIØ"Ÿj™jžl‰NˆDÜ˜(¤D×)Ò)Ü—’œŸ™Ÿ™ iÓ6Ô7Ø× Ñ  ¬2¯7©7¯<©<¸	Ó+HÖIäœ"Ÿ'™'Ÿ,™, yÓ7¸Àw×OÕOÐSTØ—G‘GœHŸOšO¨HÓ5Ô6÷ PÑOó +÷
 P×OÐOús   Ã&DÄDc           	     ó˜  € \         P                  ! 4       .pR \         P                  9   d}   T\         P                  R ,          P                  \         P                  4       Uu. uF6  p\         P
                  P                  \         P                  ! 4       V4      NK8  	  up,          p\         P                  P                  V4      p\        V\        P                  \        \         P                  VR7      V P
                  RRR7      p\        ^(4       F_  pVP                  4       e    Mg\        P                  ! 4       R8X  d   \        P                   ! ^4       KI  \        P                   ! R4       Ka  	  VP#                  4        \%        R4      hVP'                  4       ^ ,          pV P)                  VP*                  ^ 4       V# u upi )Ú
PYTHONPATH)r/   Tr   )ÚstdoutÚenvÚcwdÚuniversal_newlinesr   Úriscv64gš™™™™™¹?zsubprocess failed to terminate)r!   ÚgetcwdÚenvironÚsplitÚpathsepr	   r#   r   Ú
subprocessÚPIPEr    ÚrangeÚpollÚplatformÚmachiner   r   ÚkillÚ	ExceptionÚcommunicateÚassertEqualÚ
returncode)r   ÚargsÚpartsÚpartÚ
pythonpathÚpÚiÚouts   &&      r   Úrun_subprocessÚAutoreloadTest.run_subprocessJ   s=  € ô —’“�ˆØœ2Ÿ:™:Ô%ØäŸJ™J |Õ4×:Ñ:¼2¿:¹:ÔFóáF�Dô —‘—‘œRŸYšY›[¨$Ö/ÙFñõ ˆEô —Z‘Z—_‘_ UÓ+ˆ
äØÜ—?‘?Ü”R—Z‘Z¨JÔ7Ø—	‘	Ø#Øô
ˆô �r–ˆAØ�v‰v‹xÒ#ÙÜ×ÒÓ! YÔ.Ü—
’
˜1–ä—
’
˜3–ñ ð �F‰FŒHÜÐ<Ó=Ð=à�m‰m‹o˜aÕ ˆØ×Ñ˜Ÿ™ qÔ)Øˆ
ùò=s   Á#<Gc           
     ó¸  € R pV P                  RRRRV//4       R EFk  pV P                  VR7      ;_uu_ 4        V P                  RR7      ;_uu_ 4        V'       d   \        P                  RR	.pM\        P                  .pV P	                  VRR.,           4      pV P                  VR4       R
R
R
4       V P                  RR7      ;_uu_ 4        V P	                  XR.,           4      pV'       d   RMRpV P                  VV R2^,          4       R
R
R
4       V P                  RR7      ;_uu_ 4        V P	                  XR.,           4      pV'       d   RMRpV P                  VV R2^,          4       R
R
R
4       R
R
R
4       EKn  	  R
#   + '       g   i     Lç; i  + '       g   i     L–; i  + '       g   i     LE; i  + '       g   i     EK½  ; i)a›  import sys

# In module mode, the path is set to the parent directory and we can import testapp.
try:
    import testapp
except ImportError:
    print("import testapp failed")
else:
    print("import testapp succeeded")

spec = getattr(sys.modules[__name__], '__spec__', None)
print(f"Starting {__name__=}, __spec__.name={getattr(spec, 'name', None)}")
exec(open("run_twice_magic.py", encoding="utf-8").read())
Útestappú__init__.pyÚ ú__main__.py)ÚwrapperÚmodule)Úmodeú-mútornado.autoreloadNÚfileztestapp/__main__.pyzimport testapp succeededzimport testapp failedz2
Starting __name__='__main__', __spec__.name=None
Ú	directoryz6
Starting __name__='__main__', __spec__.name=__main__
)FTz¬import testapp succeeded
Starting __name__='__main__', __spec__.name=testapp.__main__
import testapp succeeded
Starting __name__='__main__', __spec__.name=testapp.__main__
)r
   ÚsubTestÚsysÚ
executablerK   rB   )r   ÚmainrR   Ú	base_argsrJ   Úexpect_imports   &     r   Útest_reloadÚAutoreloadTest.test_reloado   s¶  € ðˆð" 	×ÑàØ! 2Ø! 4ððô	
ô %ˆGØ—‘ g�×.Õ.Ø—\‘\ x�\×0Õ0ßÜ%(§^¡^°TÐ;OÐ$P™	ä%(§^¡^Ð$4˜	ð ×-Ñ-¨i¸4ÀÐ:KÕ.KÓL�CØ×$Ñ$Øðô÷ 1ð" —\‘\ v�\×.Õ.Ø×-Ñ-¨iÐ;PÐ:QÕ.QÓR�C÷ #ñ 3à4ð "ð ×$Ñ$ØØ(˜/Ð)]Ð^Øõô÷ /ð" —\‘\ {�\×3Õ3ð ×-Ñ-¨i¸9¸+Õ.EÓF�C÷ #ñ 3à4ð "ð
 ×$Ñ$ØØ(˜/Ð)aÐbØõô÷ 4÷G /Ò.ó %ç0×0ú÷" /×.ú÷" 4×3ú÷G /×.Ñ.úsV   ºGÁAFÂ/"GÃAF!Ä"GÄ5AF4Å7GÆFÆGÆ!F1Æ,GÆ4GÆ?GÇGc                ó¤   € R pV P                  RRRRV//4       V P                  \        P                  RRRR.4      pV P	                  VR4       R# )	a  import sys

# This import will fail if path is not set up correctly
import testapp

if 'tornado.autoreload' not in sys.modules:
    raise Exception('started without autoreload wrapper')

print('Starting')
exec(open("run_twice_magic.py", encoding="utf-8").read())
rN   rO   rP   rQ   rU   rV   NzStarting
Starting
©r
   rK   rZ   r[   rB   ©r   r\   rJ   s   &  r   Ú test_reload_wrapper_preservationÚ/AutoreloadTest.test_reload_wrapper_preservationÀ   sh   € ðˆð 	×ÑàØ! 2Ø! 4ððô	
ð ×!Ñ!Ü�^‰^˜TÐ#7¸¸yÐIó
ˆð 	×Ñ˜Ð.Ö/r   c           
     ó¢   € R pV P                  RV/4       V P                  \        P                  RRRRRRR.4      pV P	                  VR4       R# )	z“import os
import sys

print(os.path.basename(sys.argv[0]))
print(f'argv={sys.argv[1:]}')
exec(open("run_twice_magic.py", encoding="utf-8").read())
úmain.pyrU   rV   Úarg1z--arg2Úarg3Nz\main.py
argv=['arg1', '--arg2', '-m', 'arg3']
main.py
argv=['arg1', '--arg2', '-m', 'arg3']
rb   rc   s   &  r   Útest_reload_wrapper_argsÚ'AutoreloadTest.test_reload_wrapper_argsß   sd   € ðˆð 	×Ñ˜) TÐ*Ô+ð ×!Ñ!ä—‘ØØ$ØØØØØð	ó
ˆð 	×Ñ˜ÐTÖUr   c                óœ   € R pV P                  RV/4       V P                  \        P                  RRRR.4      pV P	                  VR4       R# )zÂimport os
import sys

if "TESTAPP_STARTED" in os.environ:
    print("exiting cleanly")
    sys.exit(0)
else:
    print("reloading")
    exec(open("run_twice_magic.py", encoding="utf-8").read())
rg   rU   rV   z--until-successzreloading
exiting cleanly
Nrb   rc   s   &  r   Ú!test_reload_wrapper_until_successÚ0AutoreloadTest.test_reload_wrapper_until_successü   sU   € ð
ˆð 	×Ñ˜) TÐ*Ô+à×!Ñ!Ü�^‰^˜TÐ#7Ð9JÈIÐVó
ˆð 	×Ñ˜Ð<Ö=r   )r   r	   )N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r
   rK   r_   rd   rj   rm   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s7   ø‡ € ò
ò@
%ô7ò #òJOòb0ò>V÷:>ð >r   r   )r!   r   r9   r   rZ   Útempfiler   r&   r   Úunittestr=   ÚTestCaser   © r   r   Ú<module>rz      s7   ðÛ 	Û Û Ý Û 
Ý Û Û Û Û ôC>�X×&Ñ&ö C>r   