U
    ,jg                     @   sf   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ e	 dd Z
ej	dd ZdS )    N)CachingFileSystemc               	   c   s\   t d} | j  | j  | jd z
| V  W 5 | j  | j  | jd X dS )z0
    Fixture providing a memory filesystem.
    Zmemory N)fsspec
filesystemstoreclearZpseudo_dirsappend)m r
   3/tmp/pip-unpacked-wheel-ojcr9xjz/fsspec/conftest.pyr	      s    





r	   c                 c   s   t d ddlm} |  t  t| }ttj	
|dd}|dd  W 5 Q R X ttjddd	|d
ddddg
}ztd dV  W 5 |  |  zt|  W n tk
r   Y nX X dS )z6
    Fixture providing a writable FTP filesystem.
    Z	pyftpdlibr   )FTPFileSystemoutwbs   helloi'  z-mz-dz-uuserz-Ppassz-w   )	localhostiI  r   r   N)pytestZimportorskipZfsspec.implementations.ftpr   Zclear_instance_cacher   stropenospathjoinwrite
subprocessPopensys
executable	terminatewaitshutilrmtree	Exceptiontimesleep)Ztmpdirr   dfPr
   r
   r   ftp_writable   s&    


r(   )r   r    r   r   r#   r   r   Zfsspec.implementations.cachedr   Zfixturer	   r(   r
   r
   r
   r   <module>   s   
