+
    Bi;-                       ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ 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 ^ RIHt ] P.                  ] P0                  8g  t]! ]R4      t]P8                  P;                  R4      '       d   ^0tM^dt ! R	 R
]P>                  4      t  ! R R]P>                  4      t! ! R R]!4      t" ! R R]!4      t# ! R R]!4      t$ ! R R]!4      t% ! R R]!4      t&]PN                  R 4       t(R t) ! R R4      t* ! R R]*]!4      t+ ! R R]!4      t, ! R R ]!4      t- ! R! R"]!4      t. ! R# R$]*]!4      t/ ! R% R&]!4      t0 ! R' R(]!4      t1 ! R) R*]!4      t2] Pf                  ] Ph                  Jd    ! R+ R,]!4      t5 ! R- R.4      t6 ! R/ R0]!4      t7]8R18X  d   ]Pr                  ! 4        R# R# )2    N)mock)support)	os_helper)script_helper)warnings_helperspawnlopenbsdc                   >   a  ] tR t^(t o R tR tR tR tR tRt	V t
R# )TestLowLevelInternalsc                   V P                  \        \        P                  ! R 4      4       V P                  \        \        P                  ! R4      4       V P                  \        \        P                  ! R4      4       R#      N)assertIsstrtempfile_infer_return_typebytesselfs   &)/usr/lib/python3.14/test/test_tempfile.pytest_infer_return_type_singles4TestLowLevelInternals.test_infer_return_type_singles)   sM    c866r:;eX88=>c866t<=r   c                   V P                  \        \        P                  ! R R 4      4       V P                  \        \        P                  ! RR4      4       V P                  \        4      ;_uu_ 4        \        P                  ! R R4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! RR 4       RRR4       R#   + '       g   i     LO; i  + '       g   i     R# ; ir   r   r   r   r   r   assertRaises	TypeErrorr   s   &r    test_infer_return_type_multiples6TestLowLevelInternals.test_infer_return_type_multiples.   s    c866r2>?eX88cBCy))''C0 *y))''R0 *) *))))s   4C1C&C#	&C7	c                   V P                  \        \        P                  ! R R4      4       V P                  \        \        P                  ! RR 4      4       V P                  \        \        P                  ! R R 4      4       V P                  \        \        P                  ! RR 4      4       V P                  \        \        P                  ! R R4      4       V P                  \        4      ;_uu_ 4        \        P                  ! RR R4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  ! RR R4       R R R 4       R #   + '       g   i     LP; i  + '       g   i     R # ; i)Nr   r   r   r   s   &r   )test_infer_return_type_multiples_and_none?TestLowLevelInternals.test_infer_return_type_multiples_and_none6   s    c866tR@Ac866r4@Ac866tTBCeX88dCDeX88sCDy))''D#6 *y))''T26 *) *))))s   5E3E)E&	)E:	c                    V P                  \        \        P                  ! \        P
                  ! R 4      4      4       R# )/N)r   r   r   r   r   FakePathr   s   &r   test_infer_return_type_pathlib4TestLowLevelInternals.test_infer_return_type_pathlibA   s&    c866y7I7I#7NOPr   c           	        \         P                  pV P                  \        \        P
                  ! V! R 4      4      4       V P                  \        \        P
                  ! V! R4      4      4       V P                  \        \        P
                  ! RV! R4      4      4       V P                  \        \        P
                  ! RV! R4      4      4       V P                  \        \        P
                  ! RV! R4      4      4       V P                  \        \        P
                  ! RV! R4      4      4       V P                  \        4      ;_uu_ 4        \        P
                  ! RV! R4      4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! RV! R4      4       RRR4       R#   + '       g   i     LU; i  + '       g   i     R# ; i)r$      /r   r   N)	r   r%   r   r   r   r   r   r   r   )r   Paths   & r   test_infer_return_type_pathlike5TestLowLevelInternals.test_infer_return_type_pathlikeD   s-   !!c866tCyABeX88dDEc866r48DEeX88d3iHIeX88tCyIJc866tT"XFGy))''DI6 *y))''T"X6 *) *))))s   F=G=G	G!	 N)__name__
__module____qualname____firstlineno__r   r   r!   r&   r+   __static_attributes____classdictcell____classdict__s   @r   r   r   (   s$     >
1	7Q7 7r   r   c                   t   a  ] tR t^Tt o ]P
                  ! R4      t]P
                  ! R4      tR tR t	Rt
V tR# )BaseTestCasez^[a-z0-9_-]{8}$s   ^[a-z0-9_-]{8}$c                    V P                  \        P                  ! 4       4       \        P                  ! R \
        R\        R7       R# )ignoremktemp)categorymessagemoduleN)enterContextr   check_warningswarningsfilterwarningsRuntimeWarningr.   r   s   &r   setUpBaseTestCase.setUpY   s1    /88:;>(0	Cr   c                   \         P                  P                  V4      w  rVVR \        V4       pV\        V4      \        V4      ,
          R  pVeZ   T P	                  \        V4      \        V4      \        J g!   \        V\         P                  4      '       d   \        M\        R4       Ve:   T P	                  \        V4      \        V4      \        J d   \        M\        R4       Ve:   T P	                  \        V4      \        V4      \        J d   \        M\        R4       W#V3R	8X  d!   V P	                  \        V4      \        R4       V P                  \         P                  P                  V4      \         P                  P                  V4      RV: RV: 24       V P                  WsRV: RV: 24       V P                  WRV: RV: 24       V\        V4      \        V4      \        V4      ,
           p\        V\        4      '       d   V P                  MV P                  p	V P                  V	P                  V4      RV: RV	P                   : 24       R # )
Nzunexpected return typezdefault return type must be strzfile z not in directory z does not begin with z does not end with zrandom characters z do not match NNN)ospathsplitlenr   typer   
isinstancePathLiker   assertEqualabspath	str_checkb_check
assertTruematchpattern)
r   namedirpresufndirnbasenprensufchecks
   &&&&&     r   	nameCheckBaseTestCase.nameCheck^   s   d+is3x c%jS)*+?MMT
9#z#r{{'C'C ( ?MM$t*T#Y#-=c524?MM$t*T#Y#-=c524c?00MM$t*c+LM 	.0D:>D	Fs=BCH	Js;@#F	H c#hs5z#c(23",UC"8"8dllE* %--1	2r   r-   N)r.   r/   r0   r1   recompilerP   rQ   rC   r^   r2   r3   r4   s   @r   r7   r7   T   s3     

-.Ijj,-GC
"2 "2r   r7   c                   &   a  ] tR t^t o R tRtV tR# )TestExportsc                   \         P                  pR ^R^R^R^R^R^R^R^R^R	^R
^R^R^R^/p. pV F,  pV^ ,          R8w  g   K  WB9  g   K  VP                  V4       K.  	  V P                  \	        V4      ^ 8H  RV,          4       R# )NamedTemporaryFileTemporaryFilemkstempmkdtempr:   TMP_MAXgettempprefixgettempprefixb
gettempdirgettempdirbtempdirtemplateSpooledTemporaryFileTemporaryDirectory_zunexpected keys: %sN)r   __dict__appendrR   rJ   )r   dictexpectedunexpkeys   &    r   test_exportsTestExports.test_exports   s       !1aqaq1A"Q 1
" C1v}!4S!  	E
a-5	7r   r-   N)r.   r/   r0   r1   ry   r2   r3   r4   s   @r   rc   rc      s     7 7r   rc   c                   r   a a ] tR t^t oV 3R ltR tR tR t]P                  ! 4       R 4       t
RtVtV ;t# )TestRandomNameSequencec                X   < \         P                  ! 4       V n        \        SV `  4        R # N)r   _RandomNameSequencersuperrC   r   	__class__s   &r   rC   TestRandomNameSequence.setUp   s    --/r   c                X    \        V P                  4      pV P                  VR R R 4       R# r   N)nextr   r^   )r   ss   & r   test_get_eight_char_str.TestRandomNameSequence.test_get_eight_char_str   s!    Lq"b"%r   c                    / pV P                   p\        \        4       F7  p\        V4      pV P	                  VR R R 4       V P                  WA4       ^W&   K9  	  R# r   )r   range
TEST_FILESr   r^   assertNotIn)r   ru   r   ir   s   &    r   	test_many TestRandomNameSequence.test_many   sQ     FFz"AQANN1b"b)Q%DG	 #r   c                Z    ^ pV P                   pV F  pV^,          pV^8X  g   K   R# 	  R# r   Nr   )r   r   r   r   s   &   r   supports_iter$TestRandomNameSequence.supports_iter   s/     FFAFABw r   c                N   \         P                  ! 4       w  rR p \         P                  ! 4       pV'       g|   \         P                  ! V4       \         P                  ! V\        V P                  4      P                  R4      4       \         P                  ! V4       \         P                  ! ^ 4       \        V P                  4      p\         P                  ! V\        V4      4      P                  R4      pV'       d   \        P                  ! V^ R7       \         P                  ! V4       \         P                  ! V4       V P                  WT4       R #   T'       d   \        P                  ! T^ R7       \         P                  ! T4       \         P                  ! T4       i ; i)Nascii)exitcode)rG   pipeforkclosewriter   r   encode_exitreadrJ   decoder   wait_processassertNotEqual)r   read_fdwrite_fdpidparent_valuechild_values   &     r   test_process_awareness-TestRandomNameSequence.test_process_awareness   s    GGI	'')C!4<#6#6w#?@"   <L'''3|+<=DDWMK$$S15HHWHHXK6 $$S15HHWHHXs   CE AF$r   )r.   r/   r0   r1   rC   r   r   r   r   requires_forkr   r2   r3   __classcell__r   r5   s   @@r   r|   r|      s;     &
	 7 7 7r   r|   c                   ,   a  ] tR t^t o R tR tRtV tR# )TestCandidateTempdirListc                    \         P                  ! 4       pV P                  \        V4      ^ 8H  4       V F  pV P	                  V\
        4       K  	  R# r   )r   _candidate_tempdir_listassertFalserJ   assertIsInstancer   )r   candcs   &  r   test_nonempty_list+TestCandidateTempdirList.test_nonempty_list   sB     //1Ta(A!!!S) r   c                P   \         P                  ! 4       ;_uu_ 4       pR FD  p\        P                  ! V4      pV'       d   K#  \        P                  P                  V4      W&   KF  	  \        P                  ! 4       pR F8  p\        P                  ! V4      pV'       g   \        hV P                  W44       K:  	   \        P                  ! 4       pV P                  W44       RRR4       R#   \        \        3 d    \        P                  p L>i ; i  + '       g   i     R# ; i)TMPDIRN)r   TEMPTMP)r   EnvironmentVarGuardrG   getenvrH   rO   r   r   
ValueErrorassertIngetcwdAttributeErrorOSErrorcurdir)r   envenvnamedirnamer   s   &    r   test_wanted_dirs)TestCandidateTempdirList.test_wanted_dirs   s     **,,2))G,w#%77??7#;CL 3
 335D2))G,j 0g, 3
$))+ MM'(% -, #G, $))$ -,,s6   !DA8D=C-D-!DDDDD%	r-   N)r.   r/   r0   r1   r   r   r2   r3   r4   s   @r   r   r      s     *) )r   r   c                   &   a  ] tR tRt o R tRtV tR# )TestGetDefaultTempdiri
  c                T  a \         P                  ! 4       ;_uu_ 4       oV3R  lp\        P                  ! \         RV4      ;_uu_ 4        \         P                  ! 4        V P                  \        P                  ! S4      . 4       R p\        P                  ! \        RV4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \         P                  ! 4        RRR4       V P                  \        P                  ! S4      . 4       RRR4       \        P                  ! \        RV4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \         P                  ! 4        RRR4       V P                  \        P                  ! S4      . 4       RRR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lv; i  + '       g   i     L[; i  + '       g   i     Lf; i  + '       g   i     R# ; i)c                  
   < S .# r~   r-   )our_temp_directorys   r   our_candidate_listKTestGetDefaultTempdir.test_no_files_left_behind.<locals>.our_candidate_list  s    *++r   r   c                      \        4       hr~   )r   )argskwargss   *,r   raise_OSErrorFTestGetDefaultTempdir.test_no_files_left_behind.<locals>.raise_OSError  s	    !)Or   openNr   )
r   rq   r   	swap_attr_get_default_tempdirrN   rG   listdirr   FileNotFoundError)r   r   r   r   s   &  @r   test_no_files_left_behind/TestGetDefaultTempdir.test_no_files_left_behind  sb   ((**.@, ""8-F#57 7 --/  ,>!?D$ &&r6=AA**+<== 557 >$$RZZ0B%CRH	 B &&r7MBB**+<== 557 >$$RZZ0B%CRH	 C7 +*  >= BA >= CB7 7 +**s   +H
A#H	-G
F7!.G
,H	;G0G/.G0H	%H7GG

GH	G-(G00H ;H	HHH'	r-   N)r.   r/   r0   r1   r   r2   r3   r4   s   @r   r   r   
  s     I Ir   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )TestGetCandidateNamesi*  c                p    \         P                  ! 4       pV P                  V\         P                  4       R # r~   )r   _get_candidate_namesr   r   )r   objs   & r   test_retval!TestGetCandidateNames.test_retval-  s&    ++-c8#?#?@r   c                ~    \         P                  ! 4       p\         P                  ! 4       pV P                  WJ 4       R # r~   )r   r   rR   )r   abs   &  r   test_same_thing%TestGetCandidateNames.test_same_thing2  s,    ))+))+r   r-   N)r.   r/   r0   r1   r   r   r2   r3   r4   s   @r   r   r   *  s     A
   r   r   c               #   $  "   \         P                  ! 4       p  \        P                  ! \         R V 4      ;_uu_ 4        Rx  RRR4       \        P
                  ! V 4       R#   + '       g   i     L(; i  \        P
                  ! T 4       i ; i5i)rn   N)r   rh   r   r   r   rmtreerV   s    r   _inside_empty_temp_dirr   :  s^     



CxC88 9 	 98 	s3   B$A5 A"A5 
B"A2	-A5 5BBc                  D   a  \         P                  ! \        R V 3R l4      # )r   c                     < \        S 4      # r~   )iternamess   r   <lambda>'_mock_candidate_names.<locals>.<lambda>G  s	    T%[r   )r   r   r   r   s   jr   _mock_candidate_namesr   D  s    X302 2r   c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestBadTempdiriJ  c           	        \        4       ;_uu_ 4        \        P                  ! \        P                  4      P
                  ;rV\        P                  \        P                  ,          \        P                  ,          ( ,          p\        P                  ! \        P                  V4        \        P                  ! \        P                  \        P                  4      '       d   V P                  R 4       V P                  \        4      ;_uu_ 4        V P                  4        RRR4       V P!                  \        P"                  ! \        P                  4      . 4       \        P                  ! \        P                  V4        RRR4       R#   + '       g   i     Lt; i  \        P                  ! \        P                  T4       i ; i  + '       g   i     R# ; i)z!can't set the directory read-onlyN)r   rG   statr   rn   st_modeS_IWUSRS_IWGRPS_IWOTHchmodaccessW_OKskipTestr   PermissionError	make_temprN   r   )r   oldmodemodes   &  r   test_read_only_directory'TestBadTempdir.test_read_only_directoryK  s   #%%WWX%5%56>>>GdllT\\1DLL@AADHHX%%t,499X--rww77MM"EF&&77NN$ 8  H,<,<!=rB))73 &% 87 ))73 &%%s=   BG+A'F"F	#<F"%GFF""'G		GG	c                   \        4       ;_uu_ 4        \        P                  P                  \        P
                  R 4      p\        P                  ! \        RV4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        V P                  4        RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)nonexistentrn   N)r   rG   rH   joinr   rn   r   r   r   r   r  r   rn   s   & r   test_nonexisting_directory)TestBadTempdir.test_nonexisting_directoryY  s    #%%ggll8#3#3]CG""8Y@@&&'899NN$ : A &% :9 A@ &%%s<   AC&C	B/C	C/B?:C	CCC&	c                   \        4       ;_uu_ 4        \        P                  P                  \        P
                  R 4      p\        VR4      P                  4        \        P                  ! \        RV4      ;_uu_ 4        V P                  \        \        34      ;_uu_ 4        V P                  4        RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)filewbrn   N)r   rG   rH   r  r   rn   r   r   r   r   r   NotADirectoryErrorr   r  r	  s   & r   test_non_directory!TestBadTempdir.test_non_directory`  s    #%%ggll8#3#3V<G$%%'""8Y@@&&(:<M'NOONN$ P A &% PO A@ &%%s<   A-C5 $C"	$C5C"	=C5CC"	"C2-C55D	r-   N)	r.   r/   r0   r1   r  r
  r  r2   r3   r4   s   @r   r   r   J  s     4%% %r   r   c                     a  ] tR tRt o  ! R R4      tRR ltR tR tR tR	 t	]
P                  R
 4       t]P                  ! ]R4      ]P"                  ! 4       R 4       4       t]P                  ! ]R4      R 4       tR tR tR tRtV tR# )TestMkstempInnerii  c                      a  ] tR tRt o ]P
                  t]P                  t]	P                  t]	P                  tR tR tR tRtV tR# )TestMkstempInner.mkstempedil  c                    V'       d   V P                   pMV P                  p\        P                  ! WV4      p\        P                  ! WW5V4      w  V n        V n        R # r~   )_bflags_tflagsr   r   _mkstemp_innerfdrU   )r   rV   rW   rX   binflagsoutput_types   &&&&&  r   __init__#TestMkstempInner.mkstemped.__init__r  sF    DLLE LLE"55cDK#+#:#:3SQ\#] TWdir   c                H    \         P                  ! V P                  V4       R # r~   )rG   r   r  )r   r   s   &&r   r    TestMkstempInner.mkstemped.writey  s    HHTWWc"r   c                r    V P                  V P                  4       V P                  V P                  4       R # r~   )_closer  _unlinkrU   r   s   &r   __del__"TestMkstempInner.mkstemped.__del__|  s"    KK LL#r   )r  rU   N)r.   r/   r0   r1   r   _bin_openflagsr  _text_openflagsr  rG   r   r#  unlinkr$  r  r   r%  r2   r3   r4   s   @r   	mkstempedr  l  sB     ))**))	^	#	$ 	$r   r*  Nc                0   \         P                  ! WV4      pVf6   V\        J d   \         P                  ! 4       pM\         P                  ! 4       pVf   V! 4       pVf   V! 4       pV P                  WW44      pV P                  VP                  WV4       V# r~   )r   r   r   rl   rm   r*  r^   rU   )r   rV   rW   rX   r  r  r  s   &&&&&  r   	do_createTestMkstempInner.do_create  s~    11#C@;c!))+**,;-C;-C~~c1tyy#C0r   c                P   V P                  4       P                  R 4       V P                  RR7      P                  R 4       V P                  RR7      P                  R 4       V P                  RRR7      P                  R 4       V P                  RRR7      P                  R 4       R# )	   blatr   rW   r   rX   rW   rX   aa.txtN)r,  r   r   s   &r   
test_basicTestMkstempInner.test_basic  s    w'3%%g.3%%g.3C(..w74V,227;r   c                   \         P                  ! 4       pV P                  VR R7      P                  R4       V P                  VRR7      P                  R4       V P                  VRR7      P                  R4       V P                  VRRR7      P                  R4       V P                  VRRR7      P                  R4       V P	                  \
        4      ;_uu_ 4        V P                  R	R R7      P                  R4       R
R
R
4       V P	                  \
        4      ;_uu_ 4        V P                  VR	R7      P                  R4       R
R
R
4       V P	                  \
        4      ;_uu_ 4        V P                  VR R	R7      P                  R4       R
R
R
4       R
#   + '       g   i     L; i  + '       g   i     Ln; i  + '       g   i     R
# ; i)r   rV   rX   r/     arV   rW      brV   rW   rX      aa   .txtr   N)r   rm   r,  r   r   r   )r   dir_bs   & r   test_basic_with_bytes_names,TestMkstempInner.test_basic_with_bytes_names  sO    $$&5c*0095d+11':5d+11':5d5;;GD5e9??Hy))NNrsN+11': *y))NNu"N-33G< *y))NNu#2N6<<WE *)	 *))))))s$   #F'#F0/$GF-	0G 	G	c                p    \        \        \        4      4      pV F  pV P                  R R7      W&   K  	  R# r3  r0  N)listr   r   r,  r   extantr   s   &  r   test_basic_many TestMkstempInner.test_basic_many  s-    eJ'(A40FI r   c                   \         P                  ! 4       p V P                  VR 7      P                  R4       V P                  \        P
                  ! V4      R 7      P                  R4       \        P                  ! 4        \        P                  ! V4       R#   \        P                  ! 4        \        P                  ! T4       i ; ir   r/  N)
r   rh   r,  r   r   r%   r   
gc_collectrG   rmdirr   rV   s   & r   test_choose_directory&TestMkstempInner.test_choose_directory  s     	NNsN#))'2NNy11#6N7==gF HHSM  HHSMs   AB -Cc                   V P                  4       p\        P                  ! \        P                  ! VP                  4      P
                  4      pR p\        P                  R8X  d   V^,	          pV^I,          pV P                  W#4       R# )  win32N)	r,  r   S_IMODErG   rU   r   sysplatformrN   )r   r  r  rv   users   &    r   test_file_modeTestMkstempInner.test_file_mode  se     ~~||BGGDII.667<<7" q=Dz*H(r   zos.spawnl not availablec                ^   \         P                  '       d   R pMRpV P                  4       pV P                  \        P
                  ! VP                  4      R4       RVP                  ,          p \        p\        P                  P                  \        P                  P                  \        P                  P                  V4      4      R4      p\        P                  R8X  d"   R\        P                   ,          pRV,          pM\        P                   p\        P"                  ! \        P$                  \        P                   WeW4      pV P'                  V^ 8  RV) ,          4       V P'                  V^ 8  RV,          4       R	#   \         d    \        P                  ^ ,          p EL5i ; i)
vqFz%dztf_inherit_check.pyrR  z"%s"z$child process caught fatal signal %dz child process reports failure %dN)r   verboser,  rN   rG   get_inheritabler  __file__	NameErrorrT  argvrH   r  r   rO   rU  
executabler   P_WAITr   )r   rZ  r  r  metester	decoratedretvals   &       r   test_noinheritTestMkstempInner.test_noinherit  s-   
 ???AA~~++DGG4e<DGG^	B bggoobggoob.AB35 <<7"/If_FI299cnniO!:fWD	F!%G%NO+  	!B	s   0F "F,+F,ztext mode not availablec                0   V P                  ^ R7      pVP                  R4       VP                  R4       \        P                  ! VP                  ^ \        P
                  4       V P                  \        P                  ! VP                  ^4      R4       R# )r   )r  s   blats   extra
r/  N)r,  r   rG   lseekr  SEEK_SETrN   r   r   fs   & r   test_textmodeTestMkstempInner.test_textmode  sc    
 NNqN!		

q"++&r*G4r   c                    \         P                  ! \         P                  ! 4       \         P                  ! 4       R \         P                  \
        4      # )r   )r   r  rl   rj   r'  r   r   s   &r   r  TestMkstempInner.make_temp  s;    &&x':':'<'/'='='?')'/'>'>'*	, 	,r   c           	        \        4       ;_uu_ 4        \        R R R4      ;_uu_ 4        V P                  4       w  r\        P                  ! V4       V P                  VR 4       V P                  4       w  r4\        P                  ! V4       V P                  VR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; iaaabbbN)r   r   r  rG   r   assertEndsWith)r   fd1name1fd2name2s   &    r   !test_collision_with_existing_file2TestMkstempInner.test_collision_with_existing_file   s     $%%"5%77>>+LSHHSMu->>+LSHHSMu- 8 &%77 &%%s#   CA5B0	C0C ;CC	c           	        \        4       ;_uu_ 4        \        R R R4      ;_uu_ 4        \        P                  ! 4       pV P	                  VR 4       V P                  4       w  r#\        P                  ! V4       V P	                  VR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; irs  )r   r   r   rh   rv  r  rG   r   )r   rV   r  rU   s   &   r   &test_collision_with_existing_directory7TestMkstempInner.test_collision_with_existing_directory  s     $%%"5%77""$CU+)JRHHRLe, 8 &%77 &%%s#   B0A"B	B0B-(B00C	r-   )NNN   )r.   r/   r0   r1   r*  r,  r5  r@  rG  rN  r   skip_unless_working_chmodrW  unittest
skipUnless
has_spawnlr   requires_subprocessrg  has_textmodern  r  r{  r~  r2   r3   r4   s   @r   r  r  i  s     $ $( <F"1 (() )) %>?  "#P # @#PJ '@A5 B5,.
- 
-r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestGetTempPrefixi  c                   \         P                  ! 4       pV P                  V\        4       V P	                  \        V4      ^ 4       \         P                  ! 4       pV P                  V\        4       V P	                  \        V4      ^ 4       R# r   )r   rj   r   r   assertGreaterrJ   rk   r   )r   ppbs   &  r   test_sane_template$TestGetTempPrefix.test_sane_template  sf    ""$a%3q61%$$&b%(3r7A&r   c                   \         P                  ! 4       R ,           p\         P                  ! RR7      p \        P                  P                  W!4      p\        P                  ! V\        P                  \        P                  ,          4      p\        P                  ! V4       \        P                  ! V4       \        P                  ! V4       R#   \        P                  ! T4       i ; i)z
xxxxxx.xxxr   prefixN)r   rj   rh   rG   rH   r  r   O_RDWRO_CREATr   r)  rL  )r   r  dr  s   &   r   test_usable_template&TestGetTempPrefix.test_usable_template)  s     ""$|3B'	Q"ABII

23BHHRLIIaLHHQKBHHQKs   BC C*r-   N)r.   r/   r0   r1   r  r  r2   r3   r4   s   @r   r  r    s     
' r   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestGetTempDiri:  c                v   \         P                  ! 4       \         P                  ! 4       3 F  pT P                  \        P
                  P                  V4      ;'       g    V\        P                  8H  R V,          4       V P                  \        P
                  P                  V4      RV,          4       K  	  R# )z%r is not an absolute pathz%r is not a directoryN)	r   rl   rm   rR   rG   rH   isabsr   isdirr   r  s   & r   test_directory_exists$TestGetTempDir.test_directory_exists=  s|     %%')=)=)?@AOOBGGMM!,>>RYY81<>OOBGGMM!,3a79 Ar   c                    \         P                  ! 4       ;_uu_ 4       pVP                  R 4       RRR4       R#   + '       g   i     R# ; i)r/  N)r   re   r   )r   r  s   & r   test_directory_writable&TestGetTempDir.test_directory_writableF  s0     ((**dJJw +***s	   :A	c                <   \         P                  ! 4       p\         P                  ! 4       p\         P                  ! 4       pV P                  WJ 4       V P	                  \        V4      \        V4      4       V P                  V\        P                  ! V4      4       R # r~   )	r   rl   rm   rR   r   rK   rN   rG   fsdecode)r   r   r   r   s   &   r   r   TestGetTempDir.test_same_thingO  sj    !!  "DGT!W-BKKN+r   c                   \         P                  ! R 4      p\         P                  Rup\         n         \        P                  ! 4       ;_uu_ 4       pWR&   V P                  \         P                  ! 4       V4       RRR4       V\         n        \        P                  ! V4       R#   + '       g   i     L3; i  T\         n        \        P                  ! T4       i ; i)z-TempNr   )r   rh   rn   r   r   rN   rl   rL  )r   case_sensitive_tempdir_tempdirr   s   &   r   test_case_sensitive"TestGetTempDir.test_case_sensitiveY  s     "*!1!1'!:%-%5%5t"("	4..00C 6H  !4!4!68NO 1
  (HOO23 10
  (HOO23s#   B9 *B&;B9 &B6	1B9 9#Cr-   N)
r.   r/   r0   r1   r  r  r   r  r2   r3   r4   s   @r   r  r  :  s     9 ,4 4r   r  c                   B   a  ] tR tRt o R	R ltR tR tR tR tRt	V t
R# )
TestMkstempih  Nc           	        \         P                  ! WV4      pVf6   V\        J d   \         P                  ! 4       pM\         P                  ! 4       pVf   V! 4       pVf   V! 4       p\         P
                  ! WVR7      w  rV\        P                  P                  V4      w  rx\        P                  P                  V4      p	V P                  WRV	: RV: R24        V P                  WaW#4       \        P                  ! V4       \        P                  ! V4       R #   \        P                  ! T4       \        P                  ! T4       i ; i)NrV   r  suffixzDirectory 'z' incorrectly returned as '')r   r   r   rl   rm   rg   rG   rH   rI   rO   rN   r^   r   r)  )
r   rV   rW   rX   r  r  rU   rY   rZ   adirs
   &&&&      r   r,  TestMkstemp.do_createk  s    11#C@;c!))+**,;-C;-C%%##F
d+wws#t=A4H	J	NN4c/HHRLIIdO HHRLIIdOs   D .Ec                    V P                  4        V P                  R R7       V P                  RR7       V P                  R RR7       V P                  RRR7       V P                  RR7       R	# )
r   r0  r   r1  r2  r3  r4  .r   Nr,  r   s   &r   r5  TestMkstemp.test_basic  sV    333C(4V,3r   c                   \         P                  ! 4       pV P                  VR R7       V P                  VRR7       V P                  VRR7       V P                  VRRR7       V P                  VRRR7       V P                  RR	7       V P                  \        4      ;_uu_ 4        V P                  R
RRR7       RRR4       V P                  \        4      ;_uu_ 4        V P                  RRRR7       RRR4       V P                  \        4      ;_uu_ 4        V P                  RRRR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L_; i  + '       g   i     R# ; i)r   r8  r9  r:  r;  r<  r=  r>     .r   r  Nr3  r4  )r   rm   r,  r   r   r  s   & r   r@  'TestMkstemp.test_basic_with_bytes_names  s	      "1#&1$'1$'1$D11%W54 y))NNs7N; *y))NNt7N; *y))NNtFN; *)	 *))))))s$   &D9 EE9E		E	E0	c                   \         P                  ! 4       p V P                  VR 7       V P                  \        P                  ! V4      R 7       \
        P                  ! V4       R#   \
        P                  ! T4       i ; ir   N)r   rh   r,  r   r%   rG   rL  rM  s   & r   rN  !TestMkstemp.test_choose_directory  sS     	NNsN#NNy11#6N7HHSMBHHSMs   8A' 'A?c                   \         P                  pV P                  \         P                  \        \	        R 4      34        \         P
                  ! 4       w  r#\        P                  ! V4       \        P                  ! V4       V P                  V\        4       \         P                  ! 4       \         n        V P                  \         P                  \        4       V P                  \         P                  ! 4       \        4       V P                  \         P                  ! 4       \        4       \         P
                  ! 4       w  r#\        P                  ! V4       \        P                  ! V4       V P                  V\        4       \         P
                  ! RR7      w  r#\        P                  ! V4       \        P                  ! V4       V P                  V\        4       \         P
                  ! RR7      w  r#\        P                  ! V4       \        P                  ! V4       V P                  V\        4       \         P
                  ! \         P                  ! 4       R7      w  r#\        P                  ! V4       \        P                  ! V4       V P                  V\        4       V\         n        R #   T\         n        i ; i)Nr4  r  z
test-temp-r  r   )r   rn   r   r   rK   rg   rG   r   r)  rm   r   rl   )r   orig_tempdirr  rH   s   &   r   .test_for_tempdir_is_bytes_issue40701_api_warts:TestMkstemp.test_for_tempdir_is_bytes_issue40701_api_warts  s   ''h..d4j0AB	,'')HBHHRLIIdO!!$,'335H!!("2"2E:!!("5"5"7=!!("6"6"8%@'')HBHHRLIIdO!!$.''v6HBHHRLIIdO!!$,''|<HBHHRLIIdO!!$,''H,?,?,ABHBHHRLIIdO!!$,+H|Hs   I*J8 8Kr-   rF   )r.   r/   r0   r1   r,  r5  r@  rN  r  r2   r3   r4   s   @r   r  r  h  s#     . <$, ,r   r  c                      a  ] tR tRt o R tRR ltR tR tR tR t	]
P                  R	 4       t]P                  ! ]P                   R
8H  R4      R 4       tR tR tR tR tRtV tR# )TestMkdtempi  c                ,    \         P                  ! 4       # r~   )r   rh   r   s   &r   r  TestMkdtemp.make_temp  s    !!r   Nc                `   \         P                  ! WV4      pVf6   V\        J d   \         P                  ! 4       pM\         P                  ! 4       pVf   V! 4       pVf   V! 4       p\         P
                  ! WVR7      p V P                  WQW#4       V#    \        P                  ! T4       h ; i)Nr  )	r   r   r   rl   rm   rh   r^   rG   rL  )r   rV   rW   rX   r  rU   s   &&&&  r   r,  TestMkdtemp.do_create  s    11#C@;c!))+**,;-C;-CCC@	NN4c/K	HHTNs    B B-c                   \         P                  ! V P                  4       4       \         P                  ! V P                  R R7      4       \         P                  ! V P                  RR7      4       \         P                  ! V P                  R RR7      4       \         P                  ! V P                  RRR7      4       R# r   r0  r   r1  r2  r3  r4  N)rG   rL  r,  r   s   &r   r5  TestMkdtemp.test_basic  su    
!"
C()
C()
CS12
Df56r   c           
         \         P                  ! 4       p\        P                  ! V P	                  VR 7      4       \        P                  ! V P	                  VRR7      4       \        P                  ! V P	                  VRR7      4       \        P                  ! V P	                  VRRR7      4       \        P                  ! V P	                  VRRR7      4       V P                  \        4      ;_uu_ 4        \        P                  ! V P	                  VRRR7      4       R	R	R	4       V P                  \        4      ;_uu_ 4        \        P                  ! V P	                  VRR
R7      4       R	R	R	4       V P                  \        4      ;_uu_ 4        \        P                  ! V P	                  RRRR7      4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     Ls; i  + '       g   i     R	# ; i)r   r9  r:  r;  r8  r<  r=  r>  r3  Nr4  r   )r   rm   rG   rL  r,  r   r   r  s   & r   r@  'TestMkdtemp.test_basic_with_bytes_names  s?     "
A&'
A401
A401
A4T:;
A5g>?y))HHT^^t^AB *y))HHT^^u&^AB *y))HHT^^7^CD *)	 *))))))s$   7)G)G)G,G	G)	,G=	c                X   \        \        \        4      4      p V F  pV P                  R R7      W&   K  	  V F1  p\	        V\
        4      '       g   K  \        P                  ! V4       K3  	  R#   T F1  p\	        T\
        4      '       g   K  \        P                  ! T4       K3  	  i ; irC  )rD  r   r   r,  rL   r   rG   rL  rE  s   &  r   rG  TestMkdtemp.test_basic_many  sy    eJ'(	  NNtN4	  a%%HHQK Va%%HHQK s   A0 0B)B)c                T   \         P                  ! 4       p \        P                  ! V P	                  VR 7      4       \        P                  ! V P	                  \
        P                  ! V4      R 7      4       \        P                  ! V4       R#   \        P                  ! T4       i ; ir  )r   rh   rG   rL  r,  r   r%   rM  s   & r   rN  !TestMkdtemp.test_choose_directory  se     	HHT^^^,-HHT^^	(:(:3(?^@AHHSMBHHSMs   A B B'c                x   V P                  4       p \        P                  ! \        P                  ! V4      P                  4      pVR ,          pRp\
        P                  R8X  d   V^,	          pV^I,          pV P                  W#4       \        P                  ! V4       R#   \        P                  ! T4       i ; i)i  i  rR  N)	r,  r   rS  rG   r   rT  rU  rN   rL  )r   rV   r  rv   rV  s   &    r   	test_modeTestMkdtemp.test_mode  s     nn	<< 4 45DEMDH||w&  1}:.T,HHSMBHHSMs   A7B! !B9ntOnly on Windows.c                   V P                  4       p \        P                  ! R V.RR7      P                  4       p\        P
                  ! V4       VP                  4       p\        4       pRpVP                  4       P                  4        F  pRpVP                  V4      '       d!   VP                  V4      P                  4       pM5V'       d.   VR,          P                  4       '       d   VP                  4       pV'       g   K{  VP                  VP                  R4      ^ ,          4       K  	  V P                  RP                  4       V4       R#   \        P
                  ! T4       i ; i)z
icacls.exeoemencodingFN:Nr  N:zBUILTIN\Users)r,  
subprocesscheck_outputcasefoldrG   rL  setstrip
splitlines
startswithremoveprefixisspaceadd	partitionr   )r   rV   outusers
found_userlineacls   &      r   test_mode_win32TestMkdtemp.test_mode_win32  s    nn	))<*=NWWYCHHSMlln
IIK**,DCs##'',224$r(**,,jjls		#--,Q/0 - 	)224e< HHSMs   (E E*c           	        \        4       ;_uu_ 4        \        R R R4      ;_uu_ 4        \        P                  ! RR7      pVP	                  4        V P                  VP                  R 4       \        P                  ! 4       pV P                  VR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)rt  ru  FdeleteN)r   r   r   re   r   rv  rU   rh   )r   r  rV   s   &  r   r{  -TestMkdtemp.test_collision_with_existing_file8  s     $%%"5%77..e<DJJL		51""$CU+ 8 &%77 &%%s#   B9A+B&	B9&B61B99C
	c           	     b   \        4       ;_uu_ 4        \        R R R4      ;_uu_ 4        \        P                  ! 4       pV P	                  VR 4       \        P                  ! 4       pV P	                  VR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; irs  )r   r   r   rh   rv  )r   dir1dir2s   &  r   r~  2TestMkdtemp.test_collision_with_existing_directoryC  sx     $%%"5%77##%De,##%De,	 8 &%77 &%%s#   BAB
	8B
BBB.	c                   \         P                  pV P                  \         P                  \        \	        R 4      34        \         P
                  ! 4       p\        P                  ! V4       V P                  V\        4       \         P                  ! 4       \         n        V P                  \         P                  \        4       V P                  \         P                  ! 4       \        4       V P                  \         P                  ! 4       \        4       \         P
                  ! 4       p\        P                  ! V4       V P                  V\        4       \         P
                  ! RR7      p\        P                  ! V4       V P                  V\        4       \         P
                  ! RR7      p\        P                  ! V4       V P                  V\        4       \         P
                  ! \         P                  ! 4       R7      p\        P                  ! V4       V P                  V\        4       V\         n        R #   T\         n        i ; i)Nz-dirr  ztest-mkdtemp-r  r   )r   rn   r   r   rK   rh   rG   rL  rm   r   rl   )r   r  rH   s   &  r   r  :TestMkdtemp.test_for_tempdir_is_bytes_issue40701_api_wartsM  sw   ''h..d4j0AB	,##%DHHTN!!$,'335H!!("2"2E:!!("5"5"7=!!("6"6"8%@##%DHHTN!!$.##62DHHTN!!$,##?;DHHTN!!$,##(;(;(=>DHHTN!!$,+H|Hs   G2I   Ic                     \         P                  ! R R7      pV P                  \        P                  P                  V4      4       \        P                  ! V4       R#   \        P                  ! X4       i ; i)r  r   N)r   rh   rR   rG   rH   r  rL  )r   rH   s   & r   test_path_is_absolute!TestMkdtemp.test_path_is_absoluteg  sG    	##,DOOBGGMM$/0HHTNBHHTNs   AA A7r-   rF   )r.   r/   r0   r1   r  r,  r5  r@  rG  rN  r   r  r  r  r  rG   rU   r  r{  r~  r  r  r2   r3   r4   s   @r   r  r    s     "(7E	  (( )" D*<== >=4	,-,4 r   r  c                   h   a a ] tR tRt oV 3R ltV 3R lt ! R R4      tR
R ltR tR t	R	t
VtV ;t# )
TestMktempiq  c                X   < \         P                  ! 4       V n        \        SV `  4        R # r~   )r   rh   rV   r   rC   r   s   &r   rC   TestMktemp.setUpv  s    ##%r   c                   < V P                   '       d(   \        P                  ! V P                   4       R V n         \        SV `  4        R # r~   )rV   rG   rL  r   tearDownr   s   &r   r  TestMktemp.tearDownz  s.    888HHTXXDHr   c                   \   a  ] tR tRt o ]P
                  t]P                  t	R t
R tRtV tR# )TestMktemp.mktempedi  c                    \         P                  ! WVR 7      V n        \        P                  ! \        P
                  ! V P                  V P                  R4      4       R# )r  rQ  N)r   r:   rU   rG   r   r   r  )r   rV   rW   rX   s   &&&&r   r  TestMktemp.mktemped.__init__  s7     CCHDI HHRWWTYYe<=r   c                <    V P                  V P                  4       R # r~   )r$  rU   r   s   &r   r%  TestMktemp.mktemped.__del__  s    LL#r   )rU   N)r.   r/   r0   r1   rG   r)  r$  r   r'  r  r  r%  r2   r3   r4   s   @r   mktempedr    s(     ))))	>	$ 	$r   r  c                    V P                  V P                  W4      pV P                  VP                  V P                  W4       V# r~   )r  rV   r^   rU   )r   rW   rX   r  s   &&& r   r,  TestMktemp.do_create  s3    }}TXXs0tyy$((C5r   c                    V P                  4        V P                  R R7       V P                  RR7       V P                  R RR7       V P                  RRR7       R# r  r  r   s   &r   r5  TestMktemp.test_basic  H    333C(4V,r   c                    \        \        \        4      4      pV F  pV P                  R R7      W&   K  	  ?\        P
                  ! 4        R# rC  )rD  r   r   r,  r   rK  rE  s   &  r   r   TestMktemp.test_many  s<    eJ'(A40FI r   r   )r   r   )r.   r/   r0   r1   rC   r  r  r,  r5  r   r2   r3   r   r   s   @@r   r  r  q  s-     
$ $- r   r  c                      a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tRtV tR# )TestNamedTemporaryFilei  Nc                    Vf   \         P                  ! 4       p\         P                  ! WVVR7      pV P                  VP                  WV4       V# )N)rV   r  r  r  )r   rl   re   r^   rU   )r   rV   rW   rX   r  r  s   &&&&& r   r,   TestNamedTemporaryFile.do_create  sG    ;%%'C**ss28: 	tyy#C0r   c                    V P                  4        V P                  R R7       V P                  RR7       V P                  R RR7       V P                  RRR7       R# r  r  r   s   &r   r5  !TestNamedTemporaryFile.test_basic  r  r   c                   V P                  4       p\        P                  ! V4      pVP                  pVP                  p?V! R 4       ?V! R4       ?\        P
                  ! RR7      '       d   V P                  V! 4       4       R# R# )   foos   barT)cpythonN)r,  weakrefrefr   r   check_impl_detailassertIsNone)r   rm  wrr   write2s   &    r   test_method_lookup)TestNamedTemporaryFile.test_method_lookup  sl     NN[[^fv$$T22bd# 3r   c                   a . ROoV3R lp\        V! 4       4       F  w  r#V P                  VSV,          4       K   	  V P                  X\        S4      ^,
          4       R# )   spam
c                     < \         P                  ! R R7      p V P                  RP                  S4      4       V P	                  ^ 4       V # )w+br  r   )r   re   r   r  seek)rm  liness    r   	make_file3TestNamedTemporaryFile.test_iter.<locals>.make_file  s7    ++7AGGCHHUO$FF1IHr   N)r   s   eggs
s   beans
)	enumeraterN   rJ   )r   r&  r   lr%  s   &   @r   	test_iter TestNamedTemporaryFile.test_iter  sP     3	
 ik*DAQa) +CJN+r   c                    \         P                  ! 4       pV P                  \        P                  P                  VP                  4      R VP                  ,          4       R# )z$NamedTemporaryFile %s does not existN)r   re   rR   rG   rH   existsrU   rl  s   & r   test_creates_named)TestNamedTemporaryFile.test_creates_named  s<    '')qvv.>G	Ir   c                   \         P                  ! 4       p \         P                  ! VR 7      ;_uu_ 4       pVP                  R4       RRR4       V P	                  \
        P                  ! V4      . 4       V P                  \
        P                  P                  XP                  4      RVP                  ,          4       \
        P                  ! V4       R#   + '       g   i     L; i  \
        P                  ! T4       i ; i)r   r/  Nz(NamedTemporaryFile %s exists after close)r   rh   re   r   rN   rG   r   r   rH   r-  rU   rL  r   rV   rm  s   &  r   test_del_on_close(TestNamedTemporaryFile.test_del_on_close  s     	,,55  6RZZ_b1RWW^^AFF3BQVVKM HHSM 65 HHSMs#   C+ CA8C+ C(	#C+ +Dc                   \         P                  ! 4       pR p \         P                  ! VRR7      pVP                  pVP	                  R4       VP                  4        V P                  \        P                  P                  VP                  4      RVP                  ,          4       Ve   \        P                  ! V4       \        P                  ! V4       R #   Te   \        P                  ! T4       \        P                  ! T4       i ; i)NF)rV   r  r/  z)NamedTemporaryFile %s missing after close)r   rh   re   rU   r   r   rR   rG   rH   r-  r)  rL  )r   rV   tmprm  s   &   r   test_dis_del_on_close,TestNamedTemporaryFile.test_dis_del_on_close  s     
	++EBA&&CGGGGGIOOBGGNN1662CaffLN 		#HHSM 		#HHSMs   BC 2Dc                    \         P                  ! 4       pVP                  R 4       VP                  4        VP                  4        VP                  4        R#    abc
N)r   re   r   r   rl  s   & r   test_multiple_close*TestNamedTemporaryFile.test_multiple_close  s7    '')							r   c                  a \         P                  ! 4       ;_uu_ 4       oV P                  \        P                  P                  SP                  4      4       R R R 4       V P                  \        P                  P                  SP                  4      4       V3R lpV P                  \        V4       R #   + '       g   i     Lf; i)Nc                  X   < S ;_uu_ 4         R R R 4       R #   + '       g   i     R # ; ir~   r-   rm  s   r   
use_closed?TestNamedTemporaryFile.test_context_manager.<locals>.use_closed          )	)
r   re   rR   rG   rH   r-  rU   r   r   r   r   r@  rm  s   & @r   test_context_manager+TestNamedTemporaryFile.test_context_manager  su    ((**aOOBGGNN16623 +/0	 	*j1 +*s   9B66C	c           
     X   \         P                  ! 4       p \         P                  ! VR RR7      ;_uu_ 4       pVP                  R4       VP                  pVP                  4        V P                  4       ;_uu_ 4        V P                  \        P                  P                  VP                  4      RVP                  : R24       RRR4       RRR4       V P                  4       ;_uu_ 4        V P                  \        P                  P                  XP                  4      RVP                  : R24       RRR4       \        P                  ! V4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LN; i  \        P                  ! T4       i ; i)TFrV   r  delete_on_closer/  NamedTemporaryFile z= is incorrectly deleted on closure when delete_on_close=FalseNz" exists after context manager exit)r   rh   re   r   rU   r   subTestrR   rG   rH   r-  r   rL  )r   rV   rm  f_names   &   r   :test_context_man_not_del_on_close_if_delete_on_close_falseQTestNamedTemporaryFile.test_context_man_not_del_on_close_if_delete_on_close_false  s$   
  	,,48=BD DGH 	\\^^OOBGGNN166$:1!&& <L MN $D   !7#6qvvj A> "?@   HHSM $^D D   HHSMsU   !F AE+>A	E	E+ F /A	E>8F E(#E++E;	6F >F		F F)c                   \         P                  ! 4       p \         P                  ! VR RR7      ;_uu_ 4       pVP                  R4       VP	                  4        \
        P                  ! VP                  4       RRR4       \
        P                  ! V4       R#   + '       g   i     L(; i  \
        P                  ! T4       i ; i)TFrH  r/  N)	r   rh   re   r   r   rG   r)  rU   rL  r1  s   &  r   &test_context_man_ok_to_delete_manually=TestNamedTemporaryFile.test_context_man_ok_to_delete_manually1  s      		,,48=BD DGH 			!&&!D HHSMD D HHSMs#   !B- AB:B- B*	%B- -Cc                4   \         P                  ! 4       pR p \         P                  ! VRRR7      ;_uu_ 4       pVP                  R4       VP                  pRRR4       V P                  \        P                  P                  XP                  4      RVP                  : R24       \        P                  ! V4       \        P                  ! V4       R#   + '       g   i     L; i  \        P                  ! T4       \        P                  ! T4       i ; i)r   FTrH  r/  NrJ  z exists after close)r   rh   re   r   rU   rR   rG   rH   r-  r)  rL  )r   rV   rL  rm  s   &   r   (test_context_man_not_del_if_delete_false?TestNamedTemporaryFile.test_context_man_not_del_if_delete_false@  s     
	,,U=AC CFG C OOBGGNN1662-affZ7JKM IIfHHSMC C IIfHHSMs#   !C) CAC) C&	!C) ).Dc                   R  p\         P                  ! 4       p V P                  \        RR7      ;_uu_ 4        V! V4      p\        P
                  ! 4        RRR4       V P                  \        P                  P                  X4      RV: R24       \        P                  ! V4       R#   + '       g   i     L\; i  \        P                  ! T4       i ; i)c                 r    \         P                  ! V R RR7      pVP                  pVP                  R4       V# TFrH  r/  )r   re   rU   r   rV   rm  tmp_names   &  r   my_func=TestNamedTemporaryFile.test_del_by_finalizer.<locals>.my_funcS  s6    ++D<ACAvvHGGG Or   z6Implicitly cleaning up <_TemporaryFileWrapper file=.*>)expected_warningexpected_regexNrJ  z exists after finalizer )r   rh   assertWarnsRegexResourceWarningr   rK  r   rG   rH   r-  rL  )r   rZ  rV   rY  s   &   r   test_del_by_finalizer,TestNamedTemporaryFile.test_del_by_finalizerP  s    	  	&&!0X '   #3<""$ RWW^^H5-h\ :2 34 HHSM  HHSMs"   B> B+<B> +B;	6B> >Cc                <    R  R lp\         P                  ! 4        R# )c                $    V ^8  d   QhR\         /# )   return)r   )formats   "r   __annotate__[TestNamedTemporaryFile.test_correct_finalizer_work_if_already_deleted.<locals>.__annotate__m  s     	 	# 	r   c                     \         P                  ! V R RR7      pVP                  pVP                  R4       VP	                  4        \
        P                  ! V4       V# rW  )r   re   rU   r   r   rG   r)  rX  s   &  r   rZ  VTestNamedTemporaryFile.test_correct_finalizer_work_if_already_deleted.<locals>.my_funcm  sI    ++D<ACAvvHGGGGGIIIhOr   N)gccollect)r   rZ  s   & r   .test_correct_finalizer_work_if_already_deletedETestNamedTemporaryFile.test_correct_finalizer_work_if_already_deletedi  s    	 	

r   c                    \         P                  ! 4       pV P                  \        P                  V4       V P                  \        4      ;_uu_ 4        \         P                  ! R VR7       RRR4       V P                  \        4      ;_uu_ 4        \         P                  ! ^VR7       RRR4       V P                  \        P                  ! V4      . 4       R#   + '       g   i     Lv; i  + '       g   i     LK; ir  )r  rV   N)r   rh   
addCleanupr   r   r   r   re   r   rN   rG   r   rM  s   & r   test_bad_mode$TestNamedTemporaryFile.test_bad_modex  s     	((#.z**''Ts; +y))''QC8 *C"-	 +*))   CC-C*	-C=	c                `   \         P                  ! 4       pV P                  \        P                  V4       V P                  \        4      ;_uu_ 4        \         P                  ! R RVR7       RRR4       V P                  \        P                  ! V4      . 4       R#   + '       g   i     L8; iwzbad-encoding)r  rV   N)r   rh   rq  r   r   r   LookupErrorre   rN   rG   r   rM  s   & r   test_bad_encoding(TestNamedTemporaryFile.test_bad_encoding  sm     	((#.{++''n#N ,C"- ,+   BB-	c                   \         P                  ! 4       pV P                  \        P                  V4       \
        P                  ! R 4      ;_uu_ 4       p\
        P                  ! R\
        P                  ! 4       4      ;_uu_ 4       p\        4       Vn	        V P                  \        4      ;_uu_ 4        \         P                  ! VR7       RRR4       RRR4       RRR4       X! 4       P                  P                  4        V P                  \        P                   ! V4      . 4       R#   + '       g   i     Lg; i  + '       g   i     Lr; i  + '       g   i     L}; i)ztempfile._TemporaryFileWrapperzio.openr   N)r   rh   rq  r   r   r   patch	mock_openKeyboardInterruptside_effectr   re   r   assert_calledrN   rG   r   )r   rV   mock_ntfr~  s   &   r   test_unexpected_error,TestNamedTemporaryFile.test_unexpected_error  s     	((#.ZZ899XZZ	4>>#344	#4#6H ""#455++4 6 5 :
 	'')C"- 65 54 :9s<   3E-D>	4D+D>	E+D;6D>	>E	EE!	r-   )Nr   r   T)r.   r/   r0   r1   r,  r5  r  r*  r.  r2  r6  r;  rE  rM  rP  rS  r`  rm  rr  ry  r  r2   r3   r4   s   @r   r  r    s`     -$ ,I
 28 2..	. 	.r   r  c                      a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestSpooledTemporaryFilei  Nc                h    Vf   \         P                  ! 4       p\         P                  ! WW4R7      pV# )N)max_sizerV   r  r  )r   rl   rp   )r   r  rV   rW   rX   r  s   &&&&& r   r,  "TestSpooledTemporaryFile.do_create  s-    ;%%'C,,hPS`r   c                    V P                  4       pV P                  VP                  4       V P                  ^dRRR7      pV P                  VP                  4       R# )d   r   r4  )r  rW   rX   N)r,  r   _rolledrl  s   & r   r5  #TestSpooledTemporaryFile.test_basic  sF    NN#NNCSfN=#r   c                b    V P                  V P                  4       \        P                  4       R # r~   )r   r,  ioIOBaser   s   &r   test_is_iobase'TestSpooledTemporaryFile.test_is_iobase  s    dnn.		:r   c                    0 Rmp\        \        \        P                  4      4      pW,
          pV P	                  VR4       R# )filenozMSpooledTemporaryFile missing attributes from IOBase/BufferedIOBase/TextIOBaseN>   r   r$  tellr   flushread1r   closeddetacherrorsr  isatty__exit____iter____next__r  newlinesreadablereadintoreadlineseekabletruncatewritable	__enter__	readinto1	readlines
writelines)r  rV   r   rp   r   )r   iobase_attrsspooledtempfile_attrsmissing_attrss   &   r   test_iobase_interface.TestSpooledTemporaryFile.test_iobase_interface  s?    	
 !$C(E(E$F G$</	
r   c                n   \         P                  ! 4       p \         P                  ! ^
VR7      pV P                  VP                  4       VP                  R4       V P                  VP                  4       VP                  pVP                  4        V P                  \        P                  ! V4      . 4       \        V\        4      '       g7   V P                  \        P                  P                  V4      RV,          4       \        P                   ! V4       R#   \        P                   ! T4       i ; i)
   )r  rV   z*SpooledTemporaryFile %s exists after closeNs   blat blat blat blat blat )r   rh   rp   r   r  r   rR   rU   r   rN   rG   r   rL   intrH   r-  rL  )r   rV   rm  filenames   &   r   r2  *TestSpooledTemporaryFile.test_del_on_close  s     	--rsCAQYY'GGL!OOAII&vvHGGIRZZ_b1h,,  !9@8KM HHSMBHHSMs   C-D D4c                   V P                  ^
R7      pVP                  R4       V P                  VP                  R4       V P	                  \
        4      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     R# ; i)r  r  r  N)r,  r   rN   rU   assertWarnsr_  r%  rl  s   & r   test_del_unrolled_file/TestSpooledTemporaryFile.test_del_unrolled_file  s\     NNBN'	&o..IIK /...s   A88B		c                   V P                  ^R7      pVP                  R4       VP                  pV P                  \        P
                  P                  V4      4       V P                  \        4      ;_uu_ 4        VP                  4        RRR4       V P                  \        P
                  P                  V4      RV,          4       R#   + '       g   i     LH; i)rd  r  r  Nz9Rolled SpooledTemporaryFile (name=%s) exists after delete)r,  r   rU   rR   rG   rH   r-  r  r_  r%  r   )r   rm  rU   s   &  r   test_del_rolled_file-TestSpooledTemporaryFile.test_del_rolled_file  s     NNAN&	vvt,-o..IIK /GGNN4 G$N	
 /.s   ;CC	c                    V P                  ^R7      pV P                  VP                  4       \        ^4       F&  pVP	                  ^ ^ 4       VP                  R4       K(  	  V P                  VP                  4       R# )   r  N   xxxxxxxxxxxxxxxxxxxx)r,  r   r  r   r$  r   )r   rm  r   s   &  r   test_rewrite_small+TestSpooledTemporaryFile.test_rewrite_small  s_    NNBN'#qAFF1aLGGI  	#r   c                h   V P                  ^R7      pV P                  VP                  4       VP                  R4       V P                  VP                  4       VP                  R4       V P                  VP                  4       VP                  R4       V P	                  VP                  4       R# )r  r     xNr  
   xxxxxxxxxx)r,  r   r  r   rR   rl  s   & r   test_write_sequential.TestSpooledTemporaryFile.test_write_sequential  s}     NNBN'#		#		#			"r   c                    V P                  4       pVP                  R4       VP                  ^ 4      pV P                  V^ 4       VP	                  4       pV P                  VR4       R# )r     xyzN)r     y   zr,  r  r$  rN   r   r   rm  posbufs   &   r   test_writelines(TestSpooledTemporaryFile.test_writelines  sS    NN	'(ffQia ffhf%r   c                   a a S P                  ^R7      oVV 3R lpSP                  V! 4       4       SP                  ^ 4      pS P                  V^ 4       SP	                  4       pS P                  VR4       R# )rd  r  c               3      <"   R x  SP                  S P                  4       Rx  SP                  S P                  4       R# 5i)s   xyr  N)r   r  rR   )rm  r   s   r   it=TestSpooledTemporaryFile.test_writelines_rollover.<locals>.it  s2     KQYY'JOOAII&s   AAr  Nr  )r   r  r  r  rm  s   f   @r   test_writelines_rollover1TestSpooledTemporaryFile.test_writelines_rollover  s`    NNAN&	' 	
RTffQia ffhf%r   c                2   V P                  ^R7      pVP                  R4       V P                  VP                  4       VP	                  . RO4       VP                  ^ 4      pV P                  V^ 4       VP                  4       pV P                  VR4       R# )rd  r  s   abcs   abcdefN)   d   e   f)r,  r   rR   r  r  r$  rN   r   r  s   &   r   test_writelines_fast_path2TestSpooledTemporaryFile.test_writelines_fast_path  sr    NNAN&			"	'(ffQia ffhi(r   c                    V P                  ^#R7      pVP                  R4       V P                  VP                  4       VP	                  R4       V P                  VP                  4       R# )#   r  r  N)r  r  s   xxxxx)r,  r  r   r  r   rR   rl  s   & r   test_writelines_sequential3TestSpooledTemporaryFile.test_writelines_sequential#  sN     NNBN'	56#			"r   c                6   V P                  ^R7      pV P                  VP                  4       VP                  ^d^ 4      pV P	                  V^d4       V P                  VP                  4       VP                  R4       V P                  VP                  4       R# )r  r  r  N)r,  r   r  r$  rN   r   rR   )r   rm  r  s   &  r   test_sparse$TestSpooledTemporaryFile.test_sparse,  sr     NNBN'#ffS!nc"#			"r   c                    V P                  ^R7      pV P                  VP                  4       V P                  VP	                  4       ^ 8  4       V P                  VP                  4       R# )r  r  N)r,  r   r  rR   r  rl  s   & r   test_fileno$TestSpooledTemporaryFile.test_fileno7  sJ    NNBN'#
Q'		"r   c                    \         P                  ! 4       pVP                  R 4       V P                  VP                  4       VP                  4        VP                  4        VP                  4        R# r9  )r   rp   r   r   r  r   rl  s   & r   #test_multiple_close_before_rollover<TestSpooledTemporaryFile.test_multiple_close_before_rollover>  sI    ))+	#						r   c                    \         P                  ! ^R7      pVP                  R4       V P                  VP                  4       VP                  4        VP                  4        VP                  4        R# )r  r  r:  N)r   rp   r   rR   r  r   rl  s   & r   "test_multiple_close_after_rollover;TestSpooledTemporaryFile.test_multiple_close_after_rolloverG  sI    ))15			"						r   c                    V P                  ^R7      pVP                  pVP                  pVP                  pV! R4       V! R4       V! ^ ^ 4       V P	                  V! ^F4      R4       R# )r  r  Ns#   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaas#   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbsF   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)r,  r   r   r$  rN   )r   rm  r   r   r$  s   &    r   test_bound_methods+TestSpooledTemporaryFile.test_bound_methodsP  s]     NNBN'vvvviiQ
b#45r   c                   \         P                  ! ^
R7      pVP                  R4       V P                  VP                  4       V P                  VP                  R4       V P                  VP                  4       V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       VP                  R4       V P                  VP                  4       V P                  VP                  R4       V P                  VP                  4       V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       R#   + '       g   i     ELp; i  + '       g   i     ELR; i  + '       g   i     EL4; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r  r  r  r"  Nzrb+r  )r   rp   r   r   r  rN   r  r  rU   r   r   r  r  r  rR   assertIsNotNonerl  s   & r   test_properties(TestSpooledTemporaryFile.test_properties^  s   ))26		#'!&&!~..JJ /~..JJ /~..HH / 	
		"'QVV$~..JJ /~..JJ /~..HH /. /........ /......sH   H
H <H4II5I.H	 H1	4I	I	I+	.I?	c                   \         P                  ! R ^
RR7      pVP                  R4       VP                  ^ 4       V P	                  VP                  4       R4       VP                  R4       VP                  ^ 4       V P	                  VP                  4       R4       V P                  VP                  4       V P	                  VP                  R 4       V P                  VP                  4       V P	                  VP                  \        P                  4       V P	                  VP                  R4       V P	                  VP                  R4       VP                  R4       VP                  ^ 4       V P	                  VP                  4       R4       VP                  R	4       VP                  ^ 4       V P	                  VP                  4       R
4       V P!                  VP                  4       V P	                  VP                  R 4       V P#                  VP                  4       V P	                  VP                  \        P                  4       V P	                  VP                  R4       V P	                  VP                  R4       R# )w+utf-8)r  r  r  zabc
zdef
zabc
def
strictzxyzzy
zabc
def
xyzzy
zfoobar
zabc
def
xyzzy
foobar
N)r   rp   r   r$  rN   r   r   r  r  r  rU   r  rG   linesepr  r  rR   r  rl  s   & r   test_text_mode'TestSpooledTemporaryFile.test_text_modev  s    ))tb3:<		q	7+		q	<0#&!&&!RZZ0W-8,			q	#67		q	#BC		"&QVV$RZZ0W-8,r   c                   \         P                  ! R ^
RRRR7      pVP                  R4       VP                  ^ 4       V P	                  VP                  4       R4       V P                  VP                  4       V P	                  VP                  R 4       V P                  VP                  4       V P                  VP                  4       V P	                  VP                  R4       V P	                  VP                  R4       VP                  R4       VP                  R4       VP                  ^ 4       V P	                  VP                  4       R	4       V P                  VP                  4       V P	                  VP                  R 4       V P                  VP                  4       V P                  VP                  4       V P	                  VP                  R4       V P	                  VP                  R4       R# )
r  r   r  r9   )r  r  newliner  r  u   Λ
Nu   ΜΜΜΜΜΜΜΜΜΜ
u(   ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝuB   Λ
ΜΜΜΜΜΜΜΜΜΜ
ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ)r   rp   r   r$  rN   r   r   r  r  r  rU   r  r  r  r  rR   rl  s   & r   test_text_newline_and_encoding7TestSpooledTemporaryFile.test_text_newline_and_encoding  sm   ))tb24w19; 	
	q	<0#&!&&!QZZ(W-8,	&'		q	I	K		"&QVV$QZZ(W-8,r   c                X  a \         P                  ! ^R7      ;_uu_ 4       oV P                  SP                  4       V P                  SP                  4       RRR4       V P                  SP                  4       V3R lpV P                  \        V4       R#   + '       g   i     LI; i)r  r  Nc                  X   < S ;_uu_ 4         R R R 4       R #   + '       g   i     R # ; ir~   r-   r?  s   r   r@  QTestSpooledTemporaryFile.test_context_manager_before_rollover.<locals>.use_closed  rB  rC  )r   rp   r   r  r  rR   r   r   rD  s   & @r   $test_context_manager_before_rollover=TestSpooledTemporaryFile.test_context_manager_before_rollover  sq    **A66!QYY'QXX& 7 	!	 	*j1 76s   7BB)	c                  a \         P                  ! ^R7      ;_uu_ 4       oV P                  SP                  4       SP	                  R4       SP                  4        V P                  SP                  4       V P                  SP                  4       RRR4       V P                  SP                  4       V3R lpV P                  \        V4       R#   + '       g   i     LI; i)r  r  r:  Nc                  X   < S ;_uu_ 4         R R R 4       R #   + '       g   i     R # ; ir~   r-   r?  s   r   r@  QTestSpooledTemporaryFile.test_context_manager_during_rollover.<locals>.use_closed  rB  rC  )
r   rp   r   r  r   r  rR   r  r   r   rD  s   & @r   $test_context_manager_during_rollover=TestSpooledTemporaryFile.test_context_manager_during_rollover  s    **A66!QYY'GGHGGIOOAII&QXX& 7 	!	 	*j1 76s   A3CC%	c                  a \         P                  ! ^R7      oSP                  R4       SP                  4        V P	                  SP
                  4       S;_uu_ 4        V P                  SP                  4       RRR4       V P	                  SP                  4       V3R lpV P                  \        V4       R#   + '       g   i     LI; i)r  r  r:  Nc                  X   < S ;_uu_ 4         R R R 4       R #   + '       g   i     R # ; ir~   r-   r?  s   r   r@  PTestSpooledTemporaryFile.test_context_manager_after_rollover.<locals>.use_closed  rB  rC  )
r   rp   r   r  rR   r  r   r  r   r   rD  s   & @r   #test_context_manager_after_rollover<TestSpooledTemporaryFile.test_context_manager_after_rollover  s    ))15					"QQXX& !	 	*j1 Qs   B<<C	c                B   \         P                  ! ^
R7      pVP                  R4       VP                  ^ 4       VP	                  4        V P                  VP                  4       V P                  VP                  P                  4       R4       \         P                  ! ^
R7      pVP                  R4       VP	                  ^4       V P                  VP                  4       V P                  VP                  P                  4       R4       \         P                  ! ^
R7      pVP                  R4       VP	                  ^4       V P                  VP                  4       V P                  \        P                  ! VP                  4       4      P                  ^4       R# )r  r  s   abcdefg
r   s   abcdN)r   rp   r   r$  r  r   r  rN   _filegetvaluerR   rG   fstatr  st_sizerl  s   & r   !test_truncate_with_size_parameter:TestSpooledTemporaryFile.test_truncate_with_size_parameter  s   ))26		q		

#))+S1))26		

1#))+W5))26		

2		"!((*-55r:r   c                x    V P                  \        P                  \        ,          \        P
                  4       R # r~   )r   r   rp   r   typesGenericAliasr   s   &r   test_class_getitem+TestSpooledTemporaryFile.test_class_getitem  s&    h;;EB((	*r   r-   )r   Nr   r   ) r.   r/   r0   r1   r,  r5  r  r  r2  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r2   r3   r4   s   @r   r  r    s     $;
*"
$
#&& 	)#	##60-@-4	222;** *r   r  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestTemporaryFilei  c                0    \         P                  ! 4        R # r~   )r   rf   r   s   &r   r5  TestTemporaryFile.test_basic  s     ""$r   c                   \         P                  ! 4       p\         P                  ! VR 7      pVP                  R4        \        P
                  ! V4       R#    TP                  4        \        P
                  ! T4       h ; irJ  )r   rh   rf   r   rG   rL  r   r1  s   &  r   test_has_no_name"TestTemporaryFile.test_has_no_name  sZ    ""$C&&3/AGGG	s   A )B c                    \         P                  ! 4       pVP                  R 4       VP                  4        VP                  4        VP                  4        R# r9  )r   rf   r   r   rl  s   & r   r;  %TestTemporaryFile.test_multiple_close
  s7    &&(AGGHGGIGGIGGIr   c                d   a  V 3R  lpV! RR4       V! RR4       V! RRRR7       V! RRR	R
7       R# )c                    < \         P                  ! V/ VB ;_uu_ 4       pVP                  V 4       VP                  ^ 4       SP	                  WP                  4       4       RRR4       R#   + '       g   i     R# ; ir   )r   rf   r   r$  rN   r   )inputr   r   fileobjr   s   &*, r   	roundtrip;TestTemporaryFile.test_mode_and_encoding.<locals>.roundtrip  sU    ++T<V<<MM%(LLO$$ULLN; =<<<s   AA,,A=	s   1234r"  zabdc
r  u   Λzutf-16r  zfoo
r   )r  Nr-   )r   r&  s   f r   test_mode_and_encoding(TestTemporaryFile.test_mode_and_encoding  s6    < gu%h%hx8ir2r   c                    \         P                  ! 4       pV P                  \        P                  V4       V P                  \        4      ;_uu_ 4        \         P                  ! R VR7       RRR4       V P                  \        4      ;_uu_ 4        \         P                  ! ^VR7       RRR4       V P                  \        P                  ! V4      . 4       R#   + '       g   i     Lv; i  + '       g   i     LK; irp  )r   rh   rq  r   r   r   r   rf   r   rN   rG   r   rM  s   & r   rr  TestTemporaryFile.test_bad_mode   s    ""$COOI,,c2"":..&&Dc: /""9--&&A37 .RZZ_b1	 /.--rt  c                `   \         P                  ! 4       pV P                  \        P                  V4       V P                  \        4      ;_uu_ 4        \         P                  ! R RVR7       RRR4       V P                  \        P                  ! V4      . 4       R#   + '       g   i     L8; irv  )r   rh   rq  r   r   r   rx  rf   rN   rG   r   rM  s   & r   ry  #TestTemporaryFile.test_bad_encoding)  sm    ""$COOI,,c2"";//&&s^M 0RZZ_b1 0/r{  c                l   \         P                  ! 4       pV P                  \        P                  V4       \
        P                  ! R R4      ;_uu_ 4        \
        P                  ! R4      ;_uu_ 4       p\
        P                  ! R4      ;_uu_ 4       p\
        P                  ! R4      ;_uu_ 4       p\        4       Vn        V P                  \        4      ;_uu_ 4        \         P                  ! VR7       RRR4       RRR4       RRR4       RRR4       RRR4       XP                  4        V P                  \        P                  ! V4      . 4       R#   + '       g   i     Lh; i  + '       g   i     Ls; i  + '       g   i     L~; i  + '       g   i     L; i  + '       g   i     L; i)ztempfile._O_TMPFILE_WORKSFz	os.unlinkzos.openzos.closer   N)r   rh   rq  r   r   r   r}  r  r  r   rf   r  rN   rG   r   )r   rV   mock_unlinkr~  
mock_closes   &    r   r  'TestTemporaryFile.test_unexpected_error0  s   ""$COOI,,c27??K((KI&&)J'':*;*='&&'899**s3 : ( ' ) @ $$&RZZ_b1 :9 (' '& )( @?sl   F#4F	E=2-E*E7E*?E=F	F#E'"E**E:5E==FF	F F##F3	r-   N)r.   r/   r0   r1   r5  r  r;  r(  rr  ry  r  r2   r3   r4   s   @r   r  r    s-     	%
	 		3	2	2	2 	2r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )NulledModulesi?  c                    V Uu. uF  q"P                   NK  	  upV n        V P                   Uu. uF  q3P                  4       NK  	  upV n        R # u upi u upi r~   )rs   refscopycontents)r   modulesmodr  s   &*  r   r  NulledModules.__init__@  s@    -45Wc\\W5	/3yy9yy9 69s
   AAc                F    V P                    F  pV F  pR W&   K	  	  K  	  R # r~   )r5  )r   r  rx   s   &  r   r  NulledModules.__enter__D  s!    A  r   c                    \        V P                  V P                  4       F&  w  r#VP                  4        VP	                  V4       K(  	  R # r~   )zipr5  r7  clearupdate)r   exc_infor  r   s   &*  r   r  NulledModules.__exit__I  s1    		4==1DAGGIHHQK 2r   )r7  r5  N)	r.   r/   r0   r1   r  r  r  r2   r3   r4   s   @r   r3  r3  ?  s     :
 r   r3  c                   B  a  ] tR tRt o RR ltRR ltR tR tR t]	P                  ! ]P                  R8H  R	4      R
 4       t]	P                  ! ]P                  R8H  R	4      R 4       t]P                   R 4       t]P                   R 4       t]	P                  ! ]! ]R4      R4      ]P                   R 4       4       t]P,                  R 4       t]P,                  R 4       tR tR tR tR tR tR tR tR t ]	P                  ! ]! ]R4      R4      R 4       t!R t"Rt#V t$R# ) TestTemporaryDirectoryiO  Nc                    Vf   \         P                  ! 4       p\         P                  ! WVVR7      pV P                  VP                  WV4       V P                  VP                  WEV4       V# )N)rV   r  r  ignore_cleanup_errors)r   rl   rq   r^   rU   
do_create2)	r   rV   rW   rX   recursedirsfilesrF  r5  s	   &&&&&&&& r   r,   TestTemporaryDirectory.do_createR  s\    ;%%'C))"79 	sxx3/'7
r   c                   V'       di   \        V4       FY  p\        P                  P                  VR V,          4      p\        P                  ! V4       V P                  Wb^,
          W44       K[  	  \        V4       FV  p\        \        P                  P                  VRV,          4      R4      ;_uu_ 4       pVP                  R4       RRR4       KX  	  R#   + '       g   i     Km  ; i)zdir%dz
test%d.txtr  s   Hello world!N)r   rG   rH   r  mkdirrG  r   r   )r   rH   rH  rI  rJ  r   rU   rm  s   &&&&&   r   rG  !TestTemporaryDirectory.do_create2]  s    4[ww||D'A+6ai= ! uAbggll4)9:DAAQ( BA AAAs   8CC)c                   \         P                  ! 4       ;_uu_ 4       p R R R 4       V P                  \        4      ;_uu_ 4       p\         P                  ! XR7       R R R 4       V P	                  XP
                  P                  \        P                  4       R #   + '       g   i     L; i  + '       g   i     LY; i)Nr   )r   rq   r   r   rN   	exceptionerrnoENOENT)r   r  cms   &  r   test_mkdtemp_failure+TestTemporaryDirectory.test_mkdtemp_failureh  sr     ((**k +011R''K8 2++U\\:	 +*11s   BB.B+	.B>	c                    \         P                  ! 4       p V P                  VR 7      pV P                  \        P
                  P                  VP                  4      RVP                  ,          4       VP                  4        V P                  \        P
                  P                  VP                  4      RVP                  ,          4       \        P                  ! V4       R#   \        P                  ! T4       i ; i)r   z$TemporaryDirectory %s does not exist*TemporaryDirectory %s exists after cleanupN)r   rh   r,  rR   rG   rH   r-  rU   cleanupr   rL  )r   rV   r  s   &  r   test_explicit_cleanup,TestTemporaryDirectory.test_explicit_cleanupr  s     	3'AOOBGGNN1662BQVVKMIIKRWW^^AFF3DqvvMO HHSMBHHSMs   B6C% %C=c                   \         P                  ! 4       ;_uu_ 4       pV P                  VR R7      p\        P                  ! VP
                  4      pV P                  VP                  4       RV: R24       \        VR,          R4      ;_uu_ 4       pVP                  R4       VP                  4        RRR4       V P                  \        \        VP                  R4      4      4      \        \         P"                  P%                  R	4      4      R
V: 24       V P                  VP                  4       \         P"                  P%                  R	4      RV: R24       VP                  4        V P'                  VP                  4       RV: R24       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)TrV   rF  TemporaryDirectory  does not exist
a_file.txtw+tHello world!
N*win1Unexpected number of files in TemporaryDirectory  existence state unexpectedz exists after cleanup)r   rq   r,  pathlibr*   rU   rR   r-  r   r   rX  rN   rJ   rD  globr  rT  rU  r  r   r   working_dirtemp_dir	temp_path	open_files   &    r   #test_explicit_cleanup_ignore_errors:TestTemporaryDirectory.test_explicit_cleanup_ignore_errors  so   ((**k~~t & =HX]]3IOOI,,.1)oNPi,.66) 01  " 7 SinnS&9!:; !8!8!?@33<-AB   "''.%i]2MNP   "%i]2GHJ% +* 76 +**s%   A4F/"F	4CF/F,'F//G 	r  r  c                   \         P                  ! 4       ;_uu_ 4       pV P                  VR 7      p\        \        P
                  P                  VP                  R4      R4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        VP                  4        RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)r   zexample.txtr  N)r   rq   r,  r   rG   rH   r  rU   r   r   rX  )r   ri  rj  s   &  r   #test_explicit_cleanup_correct_error:TestTemporaryDirectory.test_explicit_cleanup_correct_error  s    ((**k~~+~6Hbggll8==-@$GG &&77$$& 8 H +*
 87 HG +**s<   AC-C		B6C		$C6CC			CCC-	c                $   \         P                  ! 4       ;_uu_ 4       pV P                  VR 7      p\        P                  P                  VP                  R4      p\        P                  ! V4       \        P                  ! V4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        VP                  4        RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)r   subdirN)r   rq   r,  rG   rH   r  rU   rM  r   
change_cwdr   r   rX  )r   ri  rj  rs  s   &   r    test_cleanup_with_used_directory7TestTemporaryDirectory.test_cleanup_with_used_directory  s    ((**k~~+~6HWW\\(--:FHHV%%f-- &&77$$& 8 .	 +* 87 .-	 +**s<   A1C>C+	-C>C+	C>C(#C+	+C;6C>>D	c                   V P                  4       pV P                  ^ R7      p\        P                  ! VP                  \        P                  P                  VP                  R4      4       VP                  4        V P                  \        P                  P                  VP                  4      RVP                  ,          4       V P                  \        P                  P                  VP                  4      R4       V P                  \        P                  ! VP                  4      R.R4       VP                  4        R# )r   rH  foorW  z-Directory pointed to by a symlink was deletedz	test0.txtz>Contents of the directory pointed to by a symlink were deletedN)r,  rG   symlinkrU   rH   r  rX  r   r-  rR   rN   r   )r   d1d2s   &  r   (test_cleanup_with_symlink_to_a_directory?TestTemporaryDirectory.test_cleanup_with_symlink_to_a_directory  s     ^^^^A^& 	

277BGGLL%89 	

0EO	Qrww/G	IBGG,{m(	) 	

r   c                  a a S P                  ^ R7      ;_uu_ 4       p\        P                  P                  VR4      p\	        VR4      P                  4        \        P                  P                  VR4      p\        P                  ! V4       \        ^4       EF  oS^,          oS P                  \        SR4      R7      ;_uu_ 4        VV 3R lpS P                  R4      ;_uu_ 4        V! R	R
R7       RRR4       S P                  R4      ;_uu_ 4        V! R	RR7       RRR4       S P                  R4      ;_uu_ 4        \        P                  ! VS4       \        P                  ! V4      P                  pV! VR
R7       \        P                  ! V4      P                  pS P                  WeRWe3,          4       RRR4       S P                  R4      ;_uu_ 4        \        P                  ! VS4       \        P                  ! V4      P                  pV! VRR7       \        P                  ! V4      P                  pS P                  WeRWe3,          4       RRR4       RRR4       EK  	  RRR4       R#   + '       g   i     EL; i  + '       g   i     ELv; i  + '       g   i     L; i  + '       g   i     Lb; i  + '       g   i     EKB  ; i  + '       g   i     R# ; i)r   rx  file1r  r  03or#  c                 *  < SP                  ^ R7      p\        P                  P                  VP                  R4      p\        P
                  ! WVR7        \        P                  ! VSRR7        \        P                  ! VS4       \        P                  ! VP                  S4       VP                  4        SP                  \        P                  P                  VP                  4      4       R#   \         d     Li ; i  \         d     Li ; ir   rx  rz  target_is_directoryF)follow_symlinksN)r,  rG   rH   r  rU   rz  r   NotImplementedErrorr   rX  r   r-  )targetr  r{  rz  r  r   s   &&  r   testDTestTemporaryDirectory.test_cleanup_with_symlink_modes.<locals>.test  s    !^^A^6"$'',,rww	"B

64GI!HHWdEJ!HHWd3 $/

(()@A  3 ! !  1 ! !$   C3 1D 3D DDDnonexisting filenonexistingFr  Nnonexisting dirTexisting filez%03o != %03oexisting dir)r,  rG   rH   r  r   r   rM  r   rK  rf  r   r   r   rN   )r   r|  r  r  r  old_modenew_moder  s   f      @r   test_cleanup_with_symlink_modes6TestTemporaryDirectory.test_cleanup_with_symlink_modes  s    ^^A^&&"GGLLW-E##%77<<F+DHHTNa
\\vdE':\;;B" &899]F :&788]E 9 o66-#%775>#9#9U>#%775>#9#9(()78:N)NP 7 n55t,#%774=#8#8Tt<#%774=#8#8(()78:N)NP 6? <; ! '&2 :99888 76 65? <;; '&&s   B-K
!K	+I;6!K	J"!K	A<J#?!K	 A<J6K	$K;J	K	J 	K	#J3.K	6KK		K
KK/	chflagszrequires os.chflagsc           	     n  a a \         P                  \         P                  ,          oS P                  S4       S P	                  ^ R7      ;_uu_ 4       p\
        P                  P                  VR4      p\        VR4      P                  4        \
        P                  P                  VR4      p\
        P                  ! V4       VV 3R lpS P                  R4      ;_uu_ 4        V! RRR	7       R
R
R
4       S P                  R4      ;_uu_ 4        V! RRR	7       R
R
R
4       S P                  R4      ;_uu_ 4        \
        P                  ! VS4       \
        P                   ! V4      P                  pV! VRR	7       \
        P                   ! V4      P                  pS P                  We4       R
R
R
4       S P                  R4      ;_uu_ 4        \
        P                  ! VS4       \
        P                   ! V4      P                  pV! VRR	7       \
        P                   ! V4      P                  pS P                  We4       R
R
R
4       R
R
R
4       R
#   + '       g   i     ELo; i  + '       g   i     ELW; i  + '       g   i     L; i  + '       g   i     LU; i  + '       g   i     R
# ; i)r   rx  r  r  r  c                 *  < SP                  ^ R7      p\        P                  P                  VP                  R4      p\        P
                  ! WVR7        \        P                  ! VSRR7        \        P                  ! VS4       \        P                  ! VP                  S4       VP                  4        SP                  \        P                  P                  VP                  4      4       R#   \         d     Li ; i  \         d     Li ; ir  )r,  rG   rH   r  rU   rz  r  r  r   rX  r   r-  )r  r  r{  rz  r  r   s   &&  r   r  DTestTemporaryDirectory.test_cleanup_with_symlink_flags.<locals>.test  s    ^^A^.'',,rww	:

6/BDJJwuEJJw. 

277E*

  !89 +  ) r  r  r  Fr  Nr  Tr  r  )r   UF_IMMUTABLEUF_NOUNLINKcheck_flagsr,  rG   rH   r  r   r   rM  rK  r  st_flagsrN   )r   r|  r  r  r  	old_flags	new_flagsr  s   f      @r   test_cleanup_with_symlink_flags6TestTemporaryDirectory.test_cleanup_with_symlink_flags  s    !!D$4$44^^A^&&"GGLLW-E##%77<<F+DHHTN:" 011]> 2/00]= 1 o..

5%(GGEN33	U6GGEN33	  6 / n--

4'GGDM22	Tt4GGDM22	  6 .E '&, 211000 /. .-E '&&so   BJ#$I	/!J#I)	!J#<A3I=	/!J#A3J	J#I& 	J#)I:4	J#=JJ#J J##J4	c                >   \         P                  ! 4       p V P                  VR 7      pVP                  p?V P	                  \
        P                  P                  V4      RV,          4       \
        P                  ! V4       R#   \
        P                  ! T4       i ; i)r   *TemporaryDirectory %s exists after __del__N)	r   rh   r,  rU   r   rG   rH   r-  rL  r   rV   r  rU   s   &   r   test_del_on_collection-TestTemporaryDirectory.test_del_on_collection#  sr      	3'A66DRWW^^D1DtKM HHSMBHHSMs   AB Bc                   \         P                  ! 4       ;_uu_ 4       pV P                  VR R7      p\        P                  ! VP
                  4      pV P                  VP                  4       RV: R24       \        VR,          R4      ;_uu_ 4       pVP                  R4       ?RRR4       V P                  \        \        VP                  R4      4      4      \        \        P                   P#                  R	4      4      R
V: 24       V P                  VP                  4       \        P                   P#                  R	4      RV: R24       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)Tr\  r]  r^  r_  r`  ra  Nrb  rc  rd  re  )r   rq   r,  rf  r*   rU   rR   r-  r   r   rN   rJ   rD  rg  r  rT  rU  r  rh  s   &    r   $test_del_on_collection_ignore_errors;TestTemporaryDirectory.test_del_on_collection_ignore_errors0  s2    ((**k~~t & =HX]]3IOOI,,.1)oNPi,.66) 01 7 SinnS&9!:; !8!8!?@33<-AB   "''.%i]2MNP +* 76 +**s%   A4E+E	%B)E+E(#E++E<	c                   V P                  4       ;_uu_ 4       pR
 F  pRP                  WR7      p\        P                  ! RV4      w  rEpVP	                  4       P                  4       pV P                  \        P                  P                  V4      RV,          4       VP	                  RR4      pV P                  RV4       V P                  RV4       K  	  R	R	R	4       R	#   + '       g   i     R	# ; i)builtinsa  if True:
                    import builtins
                    import os
                    import shutil
                    import sys
                    import tempfile
                    import warnings

                    tmp = tempfile.TemporaryDirectory(dir={dir!r})
                    sys.stdout.buffer.write(tmp.name.encode())

                    tmp2 = os.path.join(tmp.name, 'test_dir')
                    os.mkdir(tmp2)
                    with open(os.path.join(tmp2, "test0.txt"), "w") as f:
                        f.write("Hello world!")

                    {mod}.tmp = tmp

                    warnings.filterwarnings("always", category=ResourceWarning)
                    )rV   r9  -crW  r  backslashreplace
Exception 'ResourceWarning: Implicitly cleaning upN)r  rG   shutilrT  r   r@   r,  rf  r   assert_python_okr   r  r   rG   rH   r-  r   r   )r   rV   r9  codercr  errrY  s   &       r   test_del_on_shutdown+TestTemporaryDirectory.test_del_on_shutdownE  s    ^^R& 30' (  -==dDI::<--/  !9H8SUjj*<=  s3GM7 S s   C C##C4	c                   \         P                  ! 4       ;_uu_ 4       pR P                  VR7      p\        P                  ! RV4      w  r4p\
        P                  ! VP                  4       P                  4       4      pV P                  \        \        VP                  R4      4      4      \        \        P                  P!                  R4      4      RV: 24       V P                  VP#                  4       \        P                  P!                  R4      RV: R24       VP                  RR	4      pV P%                  R
V4       V P%                  RV4       V P'                  RV4       RRR4       R#   + '       g   i     R# ; i)a  if True:
                import pathlib
                import sys
                import tempfile
                import warnings

                temp_dir = tempfile.TemporaryDirectory(
                    dir={working_dir!r}, ignore_cleanup_errors=True)
                sys.stdout.buffer.write(temp_dir.name.encode())

                temp_dir_2 = pathlib.Path(temp_dir.name) / "test_dir"
                temp_dir_2.mkdir()
                with open(temp_dir_2 / "test0.txt", "w") as test_file:
                    test_file.write("Hello world!")
                open_file = open(temp_dir_2 / "open_file.txt", "w")
                open_file.write("Hello world!")

                warnings.filterwarnings("always", category=ResourceWarning)
                )ri  r  rb  rc  rd  r]  re  r  r  	ExceptionErrorr  N)r   rq   rf  r   r  rf  r*   r   r  rN   rJ   rD  rg  r  rT  rU  r  r-  r   r   )r   ri  r  __r  r  rk  s   &      r   "test_del_on_shutdown_ignore_errors9TestTemporaryDirectory.test_del_on_shutdown_ignore_errorse  s9   ((**k$ F{F3% & )99$ELBSSZZ\%7%7%9:ISinnS&9!:; !8!8!?@33<-AB   "''.%i]2MNP **W&89C[#.Wc*MMCSIC +***s   EE00F	c                   V P                  4       ;_uu_ 4       pR P                  VR7      p\        P                  ! RV4      w  r4pVP	                  4       P                  4       pV P                  \        P                  P                  V4      RV,          4       VP	                  RR4      pV P                  RV4       V P                  RV4       RRR4       R#   + '       g   i     R# ; i)	a  if True:
                import sys
                import tempfile
                import warnings

                def generator():
                    with tempfile.TemporaryDirectory(dir={dir!r}) as tmp:
                        yield tmp
                g = generator()
                sys.stdout.buffer.write(next(g).encode())

                warnings.filterwarnings("always", category=ResourceWarning)
                r   r  rW  r  r  r  r  Nr  )r   rV   r  r  r  r  rY  s   &      r   test_exit_on_shutdown,TestTemporaryDirectory.test_exit_on_shutdown  s    ^^ FsFO  )99$ELBSzz|))+HRWW^^H5DxOQ**W&89C\3/MMCSI) s   B7CC+	c           	        V P                  4       ;_uu_ 4       pV P                  V^R7      pVP                  p\        P                  ! R\        3RR7      ;_uu_ 4        \
        P                  ! R\        R7       ?\        P                  ! 4        RRR4       V P                  \        P                  P                  V4      RV,          4       RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)	   )rV   rH  
ImplicitlyF)quietalways)r;   Nr  )r,  rU   r   r?   r_  r@   rA   r   rK  r   rG   rH   r-  r  s   &   r   test_warnings_on_cleanup/TestTemporaryDirectory.test_warnings_on_cleanup  s    ^^32A66D !//1@1B6;= = ''?K""$= RWW^^D1DtKM 
= = s$   AC-3C	>C-C*%C--C>	c                    V P                  4       pVP                  4        VP                  4        VP                  4        R # r~   )r,  rX  r  s   & r   r;  *TestTemporaryDirectory.test_multiple_close  s)    NN									r   c                `   V P                  4       pV;_uu_ 4       pV P                  \        P                  P	                  V4      4       V P                  W!P                  4       R R R 4       V P                  \        P                  P	                  X4      4       R #   + '       g   i     L@; ir~   )r,  rR   rG   rH   r-  rN   rU   r   )r   r  rU   s   &  r   rE  +TestTemporaryDirectory.test_context_manager  sj    NNQ$OOBGGNN401T66*  	-. Qs   A
BB-	c                   \        ^4       EF(  pV^,          pV P                  \        VR4      R7      ;_uu_ 4        V P                  ^^^R7      pT;_uu_ 4        \        P
                  ! VP                  RR7       FY  w  r4pV F7  p\        P                  ! \        P                  P                  W64      V4       K9  	  \        P                  ! W14       K[  	  VP                  4        RRR4       V P                  \        P                  P                  VP                  4      4       RRR4       EK+  	  R#   + '       g   i     LW; i  + '       g   i     EKT  ; i)   r  r#  rH  rI  rJ  FtopdownN)r   rK  rf  r,  rG   walkrU   r   rH   r  rX  r   r-  )r   r  r  rootrI  rJ  rU   s   &      r   
test_modes!TestTemporaryDirectory.test_modes  s    !HDQJD6$#677NN11AN>Q-/WWQVVU-K)E$)DHHRWW\\$%=tD %*, .L IIK    !78 87  Q 877s%   EBD;,A E;EEE c                z   \         P                  p \        VR 4      P                  4         \        P
                  ! W!4       \        P
                  ! V^ 4       \         P                  ! V4       R#   \         d#   pT P                  RTR RT 24        Rp?L@Rp?ii ; i  \         P                  ! T4       i ; i)rw  z chflags() doesn't support flags z#bz: N)	r   TESTFNr   r   rG   r  r   r   r)  )r   r  r  excs   &&  r   r  "TestTemporaryDirectory.check_flags  s    ##	'3%%'(

8+ 

8Q'X&  4 @!&r
"SE3 4 44 X&s4   B" A2 B" 2B=BB" BB" "B:c           
     t   \         P                  \         P                  ,          pV P                  V4       V P	                  ^^^R7      pT;_uu_ 4        \
        P                  ! VP                  RR7       FY  w  r4pV F7  p\
        P                  ! \
        P                  P                  W64      V4       K9  	  \
        P                  ! W14       K[  	  VP                  4        RRR4       V P                  \
        P                  P                  VP                  4      4       R#   + '       g   i     LJ; i)r  r  Fr  N)r   r  r  r  r,  rG   r  rU   r  rH   r  rX  r   r-  )r   r  r  r  rI  rJ  rU   s   &      r   
test_flags!TestTemporaryDirectory.test_flags  s    !!D$4$44NN11AN6Q%'WWQVVU%C!E!DJJrww||D7? "

4' &D IIK  	/0 Qs   BD''D7	c                   \         P                  ! R R7      ;_uu_ 4       p RRR4       V P                  \        P                  P                  X4      4       \        P                  ! V4       R#   + '       g   i     LV; i)Fr  N)r   rq   rR   rG   rH   r-  r  r   )r   ri  s   & r   test_delete_false(TestTemporaryDirectory.test_delete_false  sK    ((66+ 7{34k" 76s   A00B 	r-   )Nr   r   r  r  r  F)r  r  r  )%r.   r/   r0   r1   r,  rG  rT  rY  rm  r  r  rG   rU   rp  ru  r   skip_unless_symlinkr}  r  hasattrr  r   cpython_onlyr  r  r  r  r  r  r;  rE  r  r  r  r  r2   r3   r4   s   @r   rD  rD  O  s{    		);J0 D*<=' >' D*<=	' >	' "" #( "".P #.P` Y/1FG"",7 # H,7\ 
 
 P P(N@#JJJ0M /9'  Y/1FG1 H1# #r   rD  __main__):r   rQ  r  rG   rf  rT  r`   r@   
contextlibr   r  r  rk  r  r  r  r   r  r   test.supportr   r   r   r(  r'  r  r  r  rU  r  r   TestCaser   r7   rc   r|   r   r   r   contextmanagerr   r   r   r  r  r  r  r  r  r  r  re   rf   r  r3  rD  r.   mainr-   r   r   <module>r     s     	 	  
 	      	      " & ( ((H,C,CCR"
 <<9%%JJ(7H-- (7X,28$$ ,2^7, 7<;7\ ;7~")| ")TIL I@ L     2% %>n-~| n-b @+4\ +4\[,, [,|h., hV0 0|b.\ b.LY*| Y*v
 h&<&<<I2L I2Z  c#\ c#J zMMO r   