a
    Re                     @   s   d Z ddlmZ ddlmZmZmZmZmZ	m
Z
 ddlmZmZmZ ddlmZmZ eeZeeZdd Zdd	 Zd
d ZdS )z Test tmpdirs module     )getcwd)realpathabspathdirnameisfilejoinexists)tempdir
in_tempdirin_dir)assert_assert_equalc               	   C   sv   t  N} t| d}t|d}|d W d    n1 s<0    Y  W d    n1 sZ0    Y  tt|   d S )Nzexample_file.txtwz
a string\n)r	   pjoinopenwriter   r   )tmpdirfnameZfobj r   Q/var/www/sunrise/env/lib/python3.9/site-packages/scipy/_lib/tests/test_tmpdirs.pytest_tempdir   s
    
Fr   c               	   C   s   t  } t b}tdd}|d W d    n1 s80    Y  ttd ttt|d W d    n1 st0    Y  tt|  tt  |  d S )Nztest.txtr   z	some text)	r   r
   r   r   r   r   r   r   r   )Zmy_cwdr   fr   r   r   test_in_tempdir   s    (0r   c                  C   s   t  } t .}t|t|  t|tt   W d    n1 s@0    Y  tt2}t|t tttttt   W d    n1 s0    Y  ttt d S )N)	r   r   r   r   MY_DIRr   r   r   MY_PATH)cwdr   r   r   r   test_given_directory    s    .

6r   N)__doc__osr   os.pathr   r   r   r   r   r   r   Zscipy._lib._tmpdirsr	   r
   r   Znumpy.testingr   r   __file__r   r   r   r   r   r   r   r   r   <module>   s    