U
    h                     @   s:   d dl Z d dlZd dlZdd Zejdddd ZdS )    Nc              	   C   sV   |  d}|d |  d}td}tt |t|t| W 5 Q R X d S )Nsource_file.txtcontentz+non_existent_directory/destination_file.txtfile)	joinwritefsspec
filesystempytestraisesFileNotFoundErrormvstr)tmpdirsourcedestinationfs r   J/var/www/html/venv/lib/python3.8/site-packages/fsspec/tests/abstract/mv.py"test_move_raises_error_with_tmpdir   s    



r   	recursive)TFc              	   C   s   | d}|d |d}t|}tjdkrDtd| d nt|d | d}t	d	}t
t |jt|t|| d
 W 5 Q R X tj|rttjdkrtd| d nt|d d S )Nr   r   Zprotected_directoryntzicacls "z" /deny Everyone:(W)im  zdestination_file.txtr   )r   z" /remove:d Everyonei  )r   r   mkdirr   osnamesystemchmodr   r   r	   r
   PermissionErrorr   pathexistsAssertionError)r   r   r   Zprotected_dirZprotected_pathr   r   r   r   r   -test_move_raises_error_with_tmpdir_permission   s    





"
r    )r   r	   r   r   markZparametrizer    r   r   r   r   <module>   s
   