Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_largefile.cpython-38.opt-1.pyc
U

>��gS�@s�dZddlZddlZddlZddlZddlmZmZmZm	Z	ddl
Z
ddlZdZ
Gdd�d�Zdd�ZGd	d
�d
eej�ZGdd�deej�Zd
d�Zedkr�e��dS)z9Test largefile support on system where this makes sense.
�N)�TESTFN�requires�unlink�
bigmemtestly*c@sbeZdZdZdd�Zedd��Zeeddd�d	d
��Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�
LargeFileTestzWTest that each file function works as expected for large
    (i.e. > 2 GiB) files.
    c	Cs�tj�t�rd}nd}|�t|���}t�|���tj}|t	dkrRW5QR�dS|dkrd|�
d�|�d�|�t	�|�
d�|��|�
t�|���tjt	d�W5QRXdS)N�r+bzw+b�r�z�a)�os�path�existsr�open�fstat�fileno�stat�ST_SIZE�size�write�seek�flush�assertEqual)�self�mode�fZcurrent_size�r�2/opt/cppython/lib/python3.8/test/test_largefile.py�setUps



zLargeFileTest.setUpc	Cs:|�td��W5QRXt�t�tjdks6|�d��dS)N�wbrz0File was not truncated by opening with mode "wb")rrrrrZfailureException)�clsrrr�
tearDownClass(s
zLargeFileTest.tearDownClass�F)rZmemuse�dry_runc	CsH|�td��2}|�t|���td�|�|��td�W5QRXdS)N�rbr)rrr�len�readr�tell)r�_sizerrrr�test_large_read2szLargeFileTest.test_large_readcCs |�t�t�tjtd�dS)Nr)rrrrrr)rrrr�test_osstat9szLargeFileTest.test_osstatc	Cs�|�td����}|�|��d�|�|�d�d�|�|��d�|�d�|�|��d�|�dd�|�|��d�|�d�|�|��d�|�dd�|�|��d�|�dd�|�|��d�|�dd�|�|��d�|�dd�|�|��tdd�|�dd�|�|��tdd	�|�tdd�|�|��d�|�t�|�|��t�|�|�d�d
�|�tdd�|�|�d�d�|�|��d�W5QRXdS)Nr#rrr	�*�Tr!����
r
)rrrr&r%rr�rrrrr�test_seek_read<s8


zLargeFileTest.test_seek_readc	Cs|�td���}|�t�|��dd�d�|�t�|��dd�d�|�t�|��dd�d�|�t�|��dd�d�|�t�|��dd�tdd�|�t�|��dd�tdd�|�t�|��tdd�d�|�t�|��td�t�|�|�d�d	�W5QRXdS)
Nr#rr*rr+r!r,r-r
)rrrr�lseekrrr%r.rrr�
test_lseek[s"" zLargeFileTest.test_lseekc	Cs"|�td���
}t|d�s$t�d��|�dd�|�|��td�td}|�|�|�	�|�|��|�|�dd�|�|��|�|d8}|�d�|�	|�|�|��d�|�dd�|�|��|�|�d�|�	d�|�|��d�|�d�|�t
|���d�W5QRXdS)	Nr�truncatez.open().truncate() not available on this systemrr!rr-r*)rr�hasattr�unittest�SkipTestrrr&rr2r$r%)rrZnewsizerrr�
test_truncatehs,







zLargeFileTest.test_truncatec
Cs>dD]4}|�td��}|�|�|�|���W5QRXqdS)N)i���l�r#)rrrZ
assertTrue�seekable)r�posrrrr�
test_seekable�s
zLargeFileTest.test_seekableN)�__name__�
__module__�__qualname__�__doc__r�classmethodr rrr(r)r/r1r6r:rrrrrs
	

rc	Cs�zddl}|�|j|j�Wnttfk
r4YnXtjdd�dksRtjdkrftddtt	��njt
tddd�}zHz |�d	�|�d
�|��Wn"ttfk
r�t�d��YnXW5|��t
t�XdS)Nr��win�darwinZ	largefilez-test requires %s bytes and a long time to runr)�	bufferingr7�xz*filesystem does not have largefile support)�signal�SIGXFSZ�SIG_IGN�ImportError�AttributeError�sys�platformr�strrrr�closerrrr�OSError�
OverflowErrorr4r5)rErrrr�setUpModule�s$
�

rPc@seZdZeej�ZdS)�CLargeFileTestN)r;r<r=�staticmethod�iorrrrrrQ�srQc@seZdZeej�ZdS)�PyLargeFileTestN)r;r<r=rR�pyiorrrrrrT�srTcCstt�dS)N)rrrrrr�tearDownModule�srV�__main__)r>rrrJr4Ztest.supportrrrrrSZ_pyiorUrrrPZTestCaserQrTrVr;�mainrrrr�<module>s $

F1le Man4ger