o
    i                     @   sh   d Z ddlZddlZddlmZ ddlZddlmZmZ ddlm	Z
 ddlmZmZ ejjd	d
 ZdS )z;
Test the entire process of creating a Pooch and using it.
    N)Path   )createos_cache)__version__   )check_tiny_datacapture_logc               	   C   s>  t d} |  rtt|  t| dtddd}|j rJ |t	t
jtdd dD ]n}t }||}|  d	 d
ksEJ W d   n1 sOw   Y  t| t|ddd}|d W d   n1 sow   Y  t }||}|  d	 dksJ W d   n1 sw   Y  t| q.dS )z(Fetch a data file from the local storagezpooch-testingz5https://github.com/fatiando/pooch/raw/{version}/data/mainZPOOCH_DATA_DIR)pathbase_urlversionZversion_devenvdatazregistry.txt)ztiny-data.txtzsubdir/tiny-data.txtr   ZDownloadingNwzutf-8)encodingzThe data is now differentZUpdating)r   existsshutilrmtreestrr   full_versionabspathZload_registryr   osr   dirname__file__r	   fetchgetvaluesplitr   openwrite)r   ZpuptargetZlog_filefnameZfin r"   k/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/pooch/tests/test_integration.pytest_create_and_fetch   s6   


r$   )__doc__r   r   pathlibr   Zpytest r   r   r   r   utilsr   r	   marknetworkr$   r"   r"   r"   r#   <module>   s   