HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //proc/thread-self/root/usr/local/lib/python3.7/test/__pycache__/test_largefile.cpython-37.pyc
B

��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	dkrHdS|dkrZ|�
d�|�d�|�t	�|�
d�|��|�
t�|���tjt	d�WdQRXdS)Nzr+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�//usr/local/lib/python3.7/test/test_largefile.py�setUps



zLargeFileTest.setUpc	Cs:|�td��WdQRXt�t�tjdks6|�d��dS)N�wbrz0File was not truncated by opening with mode "wb")r
rr
rrZfailureException)�clsrrr�
tearDownClass(s
zLargeFileTest.tearDownClass�F)rZmemuseZdry_runc	CsH|�td��2}|�t|���td�|�|��td�WdQRXdS)N�rbr)r
rr�len�readr�tell)rZ_sizerrrr�test_large_read2szLargeFileTest.test_large_readcCs |�t�t�tjtd�dS)Nr)rr
rrrr)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�WdQRXdS)Nr!rrr�*�Tr i�����
r	)r
rrr$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	�WdQRXdS)
Nr!rr'rr(r i����r)r	)r
rrr
�lseekrrr#)rrrrr�
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�WdQRXdS)	Nzr+b�truncatez.open().truncate() not available on this systemrr rr)r')r
r�hasattr�unittest�SkipTestrrr$rr-r"r#)rrZnewsizerrr�
test_truncatehs,







zLargeFileTest.test_truncatec
CsBx<dD]4}|�td��}|�|�|�|���WdQRXqWdS)N)i���llr!)r
rrZ
assertTrue�seekable)r�posrrrr�
test_seekable�s

zLargeFileTest.test_seekableN)�__name__�
__module__�__qualname__�__doc__r�classmethodrrrr%r&r*r,r1r4rrrrrs

rc	Cs�yddl}|�|j|j�Wnttfk
r4YnXtjdd�dksRtjdkrftddtt	��njt
tddd�}zHy |�d	�|�
d
�|��Wn"ttfk
r�t�d��YnXWd|��tt�XdS)Nr��win�darwinZ	largefilez-test requires %s bytes and a long time to runr)�	bufferingl�xz*filesystem does not have largefile support)�signal�SIGXFSZ�SIG_IGN�ImportError�AttributeError�sys�platformr�strrr
rrrr�OSError�
OverflowErrorr/r0�closer)r?rrrr�setUpModule�s"

rJc@seZdZeej�ZdS)�CLargeFileTestN)r5r6r7�staticmethod�ior
rrrrrK�srKc@seZdZeej�ZdS)�PyLargeFileTestN)r5r6r7rL�pyior
rrrrrN�srNcCstt�dS)N)rrrrrr�tearDownModule�srP�__main__)r8r
rrDr/Ztest.supportrrrrrMZ_pyiorOrrrJZTestCaserKrNrPr5�mainrrrr�<module>s $