
    ^hT                     4    S SK Jr  S SKJr  S SKJr  S rS rg)    )Path)NamedFileInTemporaryDirectory)TemporaryWorkingDirectoryc                  T   [        S5       n U R                  nU R                  (       a   e[        U5      R	                  5       (       d   eU R                  S5        S S S 5        W R                  (       d   e[        W5      R	                  5       (       a   eg ! , (       d  f       NB= f)Nfilenames   test)r   nameclosedr   existswrite)filer   s     Z/home/james-whalen/.local/lib/python3.13/site-packages/IPython/utils/tests/test_tempdir.py&test_named_file_in_temporary_directoryr      s~    	&z	2dyy;;Dz  """"

7	 
3
 ;;;Dz  """"" 
3	2s   AB
B'c                     [        5        n [        U 5      R                  5       nUR                  5       (       d   e[        R                  " 5       R                  5       U:X  d   e S S S 5        WR                  5       (       a   e[        R                  " 5       R                  5       U:w  d   eg ! , (       d  f       NO= f)N)r   r   resolver
   cwd)	directorydirectory_paths     r    test_temporary_working_directoryr      s    	"	$	i002$$&&&&xxz!!#~555 
% $$&&&&88:>111 
%	$s   AB//
B=N)pathlibr   IPython.utils.tempdirr   r   r   r        r   <module>r      s     ? ;#2r   