HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/cloudlinux/venv/lib/python3.11/site-packages/smmap/test/__pycache__/lib.cpython-311.opt-1.pyc
�

�h���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��tj|���|_||_t	|jd��5}|�|dz
��|�d��ddd��dS#1swxYwYdS)N)�prefix�wb��1)�tempfile�mktemprr�open�seek�write)�self�sizer�fps    �C/opt/cloudlinux/venv/lib/python3.11/site-packages/smmap/test/lib.py�__init__zFileCreator.__init__s����_�F�3�3�3��
���
�
�$�*�d�
#�
#�	�r��G�G�D�1�H�����H�H�T�N�N�N�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�.A2�2A6�9A6c�\�	tj|j��dS#t$rYdSwxYw�N)�os�remove�path�OSError�rs r�__del__zFileCreator.__del__sA��	��I�d�i� � � � � ���	�	�	��D�D�	���s��
+�+c��|Sr�rs r�	__enter__zFileCreator.__enter__%s����c�.�|���dSr)r )r�exc_type�	exc_value�	tracebacks    r�__exit__zFileCreator.__exit__(s���������r$c��|jSr)rrs rrzFileCreator.path+�
���z�r$c��|jSr)rrs 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.r/r0�k_window_test_size�classmethodr6r"r$rrr6s=������&�&�0���
�
��[�
�
�
r$)r0�unittestrrr�__all__rrr"r$r�<module>r;s���.�.�������	�	�	�	������}�
%��
&�&�&�&�&�&�&�&�V
�
�
�
�
�x�
�
�
�
�
r$