CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
test_disk.cpython-310.pyc23 linesDownload Raw Back to __pycache__
1o

2��Yi��@s�dZddlmZddlZddlZddlmZmZmZm	Z	ddl3mZmZdd�Z
edd	d4ed�fdd
g�dd��Zeddedfdedfg�dd��Zdd�Zdd�ZdS)z$5Unit tests for the disk utilities.6�)�with_statementN)�	disk_used�memstr_to_bytes�mkdirp�7rm_subdirs)�parametrize�raisescCs�|j}t�d�}|j}d}t|d|�}t�d|d�}ttj�|d�d��
}|�|�Wd�n1s7wYt	|�|ksDJ�t	|�|dksNJ�dS)N�ii)��test�wb�)8�strpath�array�itemsize�int�open�os�path�join�tofiler)�tmpdirZcachedir�aZsizeof_iZtarget_size�n�output�r�E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\joblib/test/test_disk.py�test_disk_useds9�rz10text,value)Z80GlPz1.4Mgffffff6A)Z120Mi�)Z53Ki�cCst|�|ksJ�dS�N)r)�text�valuerrr�test_memstr_to_bytes%s11r!ztext,exception,regexZfooGz Invalid literal for size.*fooG.*z1.4Nz Invalid literal for size.*1.4N.*cCsBt|��}t|�Wd�n1swY|�|�sJ�dSr)rr�match)r�	exception�regex�excinforrr�test_memstr_to_bytes_exception2s1213�r&cCstttj�|jd��ttj�|jd��ttj�|jdd��tt��
td�Wd�dS1s3wYdS)NZhamZspam�)rrrrrr�OSError)rrrr�test_mkdirp?s1415"�r)cCs\tj�|jdd�}tj�|d�}ttj�|��t|�tj�|�s$J�tj�|�r,J�dS)NZ16subdir_oneZ17subdir_twoZsubdir_three)rrrrrr�exists)rZsub_path�	full_pathrrr�test_rm_subdirsIsr,)�__doc__�18__future__rrrZjoblib.diskrrrrZjoblib.testingrrrrr!�19ValueErrorr&r)r,rrrr�<module>s2	20��21	��2223 
Aluode/PerceptionLabPortable · CoolFace