+
    Biq                         R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^RI
Ht ^RIHtHt R tR tR tR	 tR
 tR tR tR t]	]P0                  3R l4       t]	R 4       tR tR tR# )z
Utilities for testing code.
N)Path)contextmanager)__version__)check_version
get_loggerc                *   \         P                  P                  V 4      '       g   Q h\        V RR7      ;_uu_ 4       pVP	                  4       pRRR4       RP                  RR.4      pXP                  4       V8X  g   Q hR#   + '       g   i     L<; i)zF
Load the tiny-data.txt file and check that the contents are correct.
utf-8encodingN
z)# A tiny data file for test purposes only1  2  3  4  5  6)ospathexistsopenreadjoinstrip)fnametinydatacontenttrue_contents   &   O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pooch/tests/utils.pycheck_tiny_datar      sr     77>>%    	eg	&	&(--/ 
'99	46HIL ==?l*** 
'	&s   BB	c                Z   \         P                  P                  V 4      '       g   Q h\        V RR7      ;_uu_ 4       pVP	                  4       pRRR4       R.pVP                  R.R,          4       XP                  4       RP                  V4      8X  g   Q hR#   + '       g   i     LT; i)zG
Load the large-data.txt file and check that the contents are correct.
r   r	   Nz*# A larer data file for test purposes onlyr   ir  r   )r   r   r   r   r   extendr   r   )r   datar   r   s   &   r   check_large_datar   #   s     77>>%    	eg	&	&$))+ 
'@AL+,t34==?dii5555	 
'	&s   BB*	c                 4    \        \        RR7      p RV  R2pV# )aO  
Get the base URL for the test data used in Pooch itself.

The URL is a GitHub raw link to the ``pooch/tests/data`` directory from the
`GitHub repository <https://github.com/fatiando/pooch>`__. It matches the
pooch version specified in ``pooch.version.full_version``.

Returns
-------
url
    The versioned URL for pooch's test data.

main)fallbackz&https://github.com/fatiando/pooch/raw/z/pooch/tests/data/)r   full_version)versionurls     r   pooch_test_urlr$   /   s$     L6:G27);M
NCJ    c                 
    Rp V # )z
Get the base URL for the test data stored in figshare.

The URL contains the DOI for the figshare dataset using the appropriate
version for this version of Pooch.

Returns
-------
url
    The URL for pooch's test data.

z$doi:10.6084/m9.figshare.14763051.v1/ r#   s    r   pooch_test_figshare_urlr)   B   s     1CJr%   c                 
    Rp V # )z
Get the base URL for the test data stored in Zenodo.

The URL contains the DOI for the Zenodo dataset using the appropriate
version for this version of Pooch.

Returns
-------
url
    The URL for pooch's test data.

zdoi:10.5281/zenodo.4924875/r'   r(   s    r   pooch_test_zenodo_urlr+   S   s     (CJr%   c                 
    Rp V # )aF  
Get base URL for test data in Zenodo, where the file name contains a slash

The URL contains the DOI for the Zenodo dataset that has a slash in the
filename (created with the GitHub-Zenodo integration service), using the
appropriate version for this version of Pooch.

Returns
-------
url
    The URL for pooch's test data.

zdoi:10.5281/zenodo.7632643/r'   r(   s    r    pooch_test_zenodo_with_slash_urlr-   d   s     (CJr%   c                 
    Rp V # )z|
Get the base URL for the test data stored on a DataVerse instance.

Returns
-------
url
    The URL for pooch's test data.
zdoi:10.11588/data/TKCFEF/r'   r(   s    r   pooch_test_dataverse_urlr/   v   s     &CJr%   c                 2    RRRRRRRRRR	R
RRRRRRRRR/
p V # )z
Get a registry for the test data used in Pooch itself.

Returns
-------
registry
    Dictionary with pooch's test data files and their hashes.

ztiny-data.txt@baee0894dba14b12085eacb204284b97e362f4f3e5a5807693cc90ef415c1b2dzlarge-data.txt@98de171fb320da82982e6bf0f3994189fff4b42b23328769afce12bdd340444azsubdir/tiny-data.txtztiny-data.zip@0d49e94f07bc1866ec57e7fd1b93a351fba36842ec9b13dd50bf94e8dfa35cbbz	store.zip@0498d2a001e71051bbd2acd2346f38da7cbd345a633cb7bf0f8a20938714b51aztiny-data.tar.gz@41503f083814f43a01a8e9a30c28d7a9fe96839a99727a7fdd0acf7cd5bab63bzstore.tar.gz@088c7f4e0f1859b1c769bb6065de24376f366374817ede8691a6ac2e49f29511ztiny-data.txt.bz2@753663687a4040c90c8578061867d1df623e6aa8011c870a5dbd88ee3c82e306ztiny-data.txt.gz@2e2da6161291657617c32192dba95635706af80c6e7335750812907b58fd4b52ztiny-data.txt.xz@99dcb5c32a6e916344bacb4badcbc2f2b6ee196977d1d8187610c21e7e607765r'   )registrys    r   pooch_test_registryr;      sN     	[\ b[W^Z_^^H Or%   c              #     "   \         P                  ! 4       p\        P                  ! V4      pVP	                  V 4       \        4       P                  V4       Vx  \        4       P                  V4       R# 5i)z
Create a context manager for reading from the logs.

Yields
------
log_file : StringIO
    a file-like object to which the logs were written
N)ioStringIOloggingStreamHandlersetLevelr   
addHandlerremoveHandler)levellog_filehandlers   &  r   capture_logrG      sU      {{}H##H-GULG$
NLw's   A5A7c              #    "   \        \        \        4      P                  R,          V,          4      p\        P
                  P                  V P                  V4      p \        P                  ! W#4       RV 2pVx  \        P
                  P                  V4      '       d   \        P                  ! V4       R# R#   \        P
                  P                  T4      '       d   \        P                  ! T4       i i ; i5i)a  
Add a test data file to the test FTP server and clean it up afterwards.

Parameters
----------
server
    The ``ftpserver`` fixture provided by pytest-localftpserver.
fname : str
    The name of a file *relative* to the test data folder of the package
    (usually just the file name, not the full path).

Yields
------
url : str
    The download URL of the data file from the test FTP server.

r   zftp://localhost/N)strr   __file__parentr   r   r   	anon_rootshutilcopyfiler   remove)serverr   package_pathserver_pathr#   s   &&   r   data_over_ftprS      s     & tH~,,v5=>L'',,v//7K#2 (	77>>+&&IIk" '277>>+&&IIk" 's   AC=B< =?C=<>C::C=c                    V P                  4        FV  pVP                  4       '       g   K  VP                  VP                  4       P                  V,          4       \        W!4       KX  	  R# )z[
Recursively change the permissions on the child directories using a bitwise
OR operation.
N)iterdiris_dirchmodstatst_mode_recursive_chmod_directories)rootmodeitems   && r   rZ   rZ      sD    
 ;;==JJtyy{**T12(4 r%   c                    \        V 4      p \        V4      V P                  ,          p\        P                  ! W4       \	        V\
        P                  R7       V# )a  
Copy contents of the source directory into destination and fix permissions.

Parameters
----------
source : str, :class:`pathlib.Path`
    Source data directory.
destination : str, :class:`pathlib.Path`
    Destination directory that will contain the copy of source. The actual
    source directory (not just it's contents) is copied.

Returns
-------
mirror : :class:`pathlib.Path`
    The path of the mirrored output directory.

)r\   )r   namerM   copytreerZ   rX   S_IWUSR)sourcedestinationmirrors   && r   mirror_directoryre      s?    $ &\F+,F
OOF# dll;Mr%   )__doc__r   r=   r?   rM   rX   pathlibr   
contextlibr    r   r!   utilsr   r   r   r   r$   r)   r+   r-   r/   r;   DEBUGrG   rS   rZ   re   r'   r%   r   <module>rl      s    
 	     % * -
+	6&""$
2 mm ( (" # #:5r%   