Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_dbm_gnu.cpython-310.pyc
o

�9j�@sxddlmZddlmZmZe�d�ZddlZddlZddl	m
Z
mZmZe
Z
Gdd�dej�Zedkr:e��dSdS)	�)�support)�
import_helper�cpython_onlyzdbm.gnuN)�TESTFN�TESTFN_NONASCII�unlinkc@s�eZdZedd��Zdd�Zdd�Zedd��Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Ze�ed�dd��Zdd�ZdS)�TestGdbmcCsBtjrzddlm}Wn
tyYdSwtd|���dSdS)Nr)�
_GDBM_VERSIONzgdbm version: )r�verbose�_gdbmr	�ImportError�print)�version�r�(/usr/lib/python3.10/test/test_dbm_gnu.py�
setUpClasss��zTestGdbm.setUpClasscCs
d|_dS�N��g��selfrrr�setUps
zTestGdbm.setUpcCs |jdur
|j��tt�dSr)r�closer�filenamerrrr�tearDowns

zTestGdbm.tearDowncCs$t�td�|_t�|t|j��dS)N�c)�gdbm�openrrr�check_disallow_instantiation�typerrrr�test_disallow_instantiationsz$TestGdbm.test_disallow_instantiationcCs^t�td�|_|�|j��g�d|jd<d|jd<d|jd<t|j���}|�|tgd���|�d|j�|�d	|j�|�|jdd�|j��}|ra|�||�|�	|�|j�
|�}|sN|�|j�d	�d
�|�|j�d��|�|j�dd�d�|�
t��
|jd
Wd�n1s�wY|�|j�dd�d�|�|jdd�dS)Nr�b�a�019237410982340912840198242�12345678910sdata�bytes)�ar%s12345678910r&�bsxxxsfoo�xxx)rrrr�assertEqual�keys�set�assertIn�firstkey�remove�nextkey�get�assertIsNone�assertRaises�KeyError�
setdefault)r�key_set�keyrrr�test_key_methods$s0




��zTestGdbm.test_key_methodscs`tt���tjtjtd�t�td��_�j����tj�fdd����tjdd��dS)N�rrcs
�jdS)Nr"rrrrr�<lambda>Ds
z0TestGdbm.test_error_conditions.<locals>.<lambda>cSst�td���S)N�rx)rrrrrrrrr9Fs)rrr2r�errorrrrrrrr�test_error_conditions=s
zTestGdbm.test_error_conditionscCs|ttj�}|td�}t|�D]}t�t|�|_|j��q|td�}|D]}|D]}t�t||�|_|j��q*q&dS)N�fsu�crwn)r+r�
open_flags�sortedrrrr)r�all�modes�mode�flags�flagrrr�
test_flagsHs
��zTestGdbm.test_flagscCs�t�td�|_tj�t�}t|d�}d||jd<tj�t�}|�||�|jd=|�	tj�t�|�|j�
�tj�t�}|�||�|�||�dS)Nri'�x)
rrrr�os�path�getsize�max�
assertGreaterr)�
reorganize�
assertLess�assertGreaterEqual)r�size0�
value_size�size1�size2rrr�test_reorganizeXs

zTestGdbm.test_reorganizecCs�t�td��}d|d<Wd�n1swYt�td��}|�t|���dg�Wd�n1s6wY|�tj��}|��Wd�n1sPwY|�t|j	�d�dS)Nrzcontext managerzgdbm context managerr8sgdbm context managerz#GDBM object has already been closed)
rrrr)�listr*r2r;�str�	exception)r�db�cmrrr�test_context_managerms
��
��zTestGdbm.test_context_managercCs�t�td��}d|d<Wd�n1swYt�td��#}|�t|���dg�|�d|v�|�|dd�Wd�dS1sFwYdS)Nrs
bytes value �sbytes key �r8)rrrr)rUr*�
assertTrue�rrXrrr�
test_bytesys
�"�zTestGdbm.test_bytescCs�t�td��}d|d<Wd�n1swYt�td��<}|�t|���d��g�|�d��|v�|�d|v�|�|d��d���|�|dd���Wd�dS1s_wYdS)NruUnicode value 🐍uUnicode key 🐍r8)rrrr)rUr*�encoder[r\rrr�test_unicode�s
��
�"�zTestGdbm.test_unicodec	Cst�td��}d|d<Wd�n1swYt�td��]}|�tj��|d=Wd�n1s5wY|�tj��|d=Wd�n1sNwY|�tj��d|d<Wd�n1shwYWd�dSWd�dS1s�wYdS)Nrsbytes values	bytes keyr8s
not exist keysnot exist value)rrrr2r;r\rrr�test_write_readonly_file�s 
���
��"�z!TestGdbm.test_write_readonly_filez*requires OS support of non-ASCII encodingscCs�t}|�t|�t�|d��}d|d<Wd�n1swY|�tj�|��t�|d��#}|�	t
|���dg�|�d|v�|�	|dd�Wd�dS1sWwYdS)Nrsvalueskeyr8)r�
addCleanuprrrr[rHrI�existsr)rUr*)rrrXrrr�test_nonascii_filename�s
�"�zTestGdbm.test_nonascii_filenamecCs`d}|�tj��
}t�|�Wd�n1swY|�|t|j��|�|jj|�dS)Nznonexisting-file)	r2rr;rr,rVrWr)r)r�nonexisting_filerYrrr�test_nonexisting_file�s�zTestGdbm.test_nonexisting_fileN)�__name__�
__module__�__qualname__�staticmethodrrrrr r7r<rFrTrZr]r_r`�unittest�
skipUnlessrrcrerrrrrs(
	
�
r�__main__)�testr�test.supportrr�
import_modulerrjrH�test.support.os_helperrrrr�TestCaserrf�mainrrrr�<module>s
#�

Youez - 2016 - github.com/yon3zu
LinuXploit