
    3[g                         d dl Z d dlmZmZ d dlmZ d dlmZ d dlm	Z	m
Z
 ed        Z edddg       ed	dd
g      d               Zy)    N)make_memmapconcurrency_safe_rename)
with_numpy)parametrize)Paralleldelayedc                     | j                  d      j                  }dt        j                  z  }t        j                  dz   }t	        ||d|      }|j
                  |k(  sJ y )Nz	test.mmap      zw+)shapemodeoffset)joinstrpathmmapALLOCATIONGRANULARITYr   r   )tmpdirfnamesizer   
memmap_objs        U/var/www/html/bid-api/venv/lib/python3.12/site-packages/joblib/test/test_backports.pytest_memmapr   	   sZ    KK$,,Et)))D''!+FU$T&IJ&&&    dst_contentzdst contentbackend	threadingc                    t        d      D cg c]  }| j                  d|z         }}|D ]  }|j                  d        | j                  d      |j                  |        t        d|      fd|D               j	                         sJ j                         dk(  sJ |D ]  }|j	                         sJ  y c c}w )N   zsrc_%dzsrc contentdst)n_jobsr   c              3   r   K   | ].  } t        t              |j                  j                         0 y w)N)r   r   r   ).0src_pathdst_paths     r   	<genexpr>z/test_concurrency_safe_rename.<locals>.<genexpr>   s4      (!H 	)'()9)98;K;KL!s   47)ranger   writer   existsread)r   r   r   i	src_pathsr#   r$   s         @r   test_concurrency_safe_renamer,      s     5:!H=HqX\*HI=}% {{5!H{#'HAw' (!(  ??==?m+++??$$$  >s   C)r   joblib.backportsr   r   joblib.test.commonr   joblib.testingr   joblibr   r   r   r,    r   r   <module>r2      s\     A ) & $ ' ' ]T=12Y{+,% - 3%r   