ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/smmap/test/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/smmap/test/__pycache__/lib.cpython-311.pyc

�

�܋f���d�dZddlmZddlZddlZddgZGd�d��ZGd�de��ZdS)z(Provide base classes for the test system�)�TestCaseN�TestBase�FileCreatorc�\�eZdZdZdZdd�Zd�Zd�Zd�Ze	d���Z
e	d	���Zd
S)rz�A instance which creates a temporary file with a prefix and a given size
    and provides this info to the user.
    Once it gets deleted, it will remove the temporary file as well.)�_size�_path�c�h�|s
Jd���tj|���|_||_t	|jd��5}|�|dz
��|�d��ddd��n#1swxYwYtj�	|j��|ksJ�dS)NzRequire size to be larger 0)�prefix�wb��1)
�tempfile�mktemprr�open�seek�write�os�path�getsize)�self�sizer�fps    �_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/smmap/test/lib.py�__init__zFileCreator.__init__s����2�2�2�2�2�t��_�F�3�3�3��
���
�
�$�*�d�
#�
#�	�r��G�G�D�1�H�����H�H�T�N�N�N�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��w���t�y�)�)�T�1�1�1�1�1�1s�.A=�=B�Bc�\�	tj|j��dS#t$rYdSwxYw�N)r�remover�OSError�rs r�__del__zFileCreator.__del__sA��	��I�d�i� � � � � ���	�	�	��D�D�	���s��
+�+c��|Sr�r s r�	__enter__zFileCreator.__enter__%s����c�.�|���dSr)r!)r�exc_type�	exc_value�	tracebacks    r�__exit__zFileCreator.__exit__(s���������r%c��|jSr)rr s rrzFileCreator.path+�
���z�r%c��|jSr)rr s rrzFileCreator.size/r,r%N)r	)�__name__�
__module__�__qualname__�__doc__�	__slots__rr!r$r*�propertyrrr#r%rrrs�������H�H�#�I�
2�
2�
2�
2��������������X������X���r%c�,�eZdZdZdZed���ZdS)rzFoundation used by all testsiK&zc��dSrr#)�clss r�setUpAllzTestBase.setUpAll?s	��	
�r%N)r.r/r0r1�k_window_test_size�classmethodr7r#r%rrr6s=������&�&�0���
�
��[�
�
�
r%)r1�unittestrrr�__all__rrr#r%r�<module>r<s���.�.�������	�	�	�	������}�
%��
&�&�&�&�&�&�&�&�V
�
�
�
�
�x�
�
�
�
�
r%

Zerion Mini Shell 1.0