
    xKg                         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	        Zy)
z;
Test the entire process of creating a Pooch and using it.
    N)Path   )createos_cache)__version__   )check_tiny_datacapture_logc                  N   t        d      } | j                         rt        j                  t	        |              t        | dt        dd      }|j                  j                         rJ |j                  t        t        j                  j                  t              dd             dD ]  }t               5 }|j                  |      }|j!                         j#                         d	   d
k(  sJ 	 ddd       t%               t'        |dd      5 }|j)                  d       ddd       t               5 }|j                  |      }|j!                         j#                         d	   dk(  sJ 	 ddd       t%        |        y# 1 sw Y   xY w# 1 sw Y   nxY w# 1 sw Y   /xY w)z(Fetch a data file from the local storagezpooch-testingz5https://github.com/fatiando/pooch/raw/{version}/data/mainPOOCH_DATA_DIR)pathbase_urlversionversion_devenvdatazregistry.txt)ztiny-data.txtzsubdir/tiny-data.txtr   DownloadingNwzutf-8)encodingzThe data is now differentUpdating)r   existsshutilrmtreestrr   full_versionabspathload_registryr   osr   dirname__file__r
   fetchgetvaluesplitr	   openwrite)r   puptargetlog_filefnamefins         `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/pooch/tests/test_integration.pytest_create_and_fetchr-      sM    O$D{{}c$i 
HC {{!!###d277??84fnMN;]hIIf%E$$&,,.q1]BBB  	%w/3II12 0]hIIf%E$$&,,.q1Z???  	 <]
 0/]s$   68FF48FF	F	F$	)__doc__r   r   pathlibr   pytest r   r   r   r   utilsr	   r
   marknetworkr-        r,   <module>r7      s?    
     * /  r6   