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.cpython-310.pyc
o

�9jq�@sdZddlZddlZddlZddlmZddlmZzddlmZWney-dZYnwej	Z
ej�e
ej	�Z
dd�Zdd	�Zd
d�ZGdd
�d
�ZGdd�dej�Ze�D]$Zej�d�sbJ�ejdd�Zde��Zeeeejfdei�e�e<qXedkr�e��dSdS)z=Test script for the dbm.open function based on testdumbdbm.py�N)�
import_helper)�	os_helper)�ndbmc	csH�tjD]}z	t|dgd�}Wn	tyYqw|tj|<|VqdS)N�open)�fromlist)�dbm�_names�
__import__�ImportError�_modules)�name�mod�r�$/usr/lib/python3.10/test/test_dbm.py�dbm_iterators�
�
�rcCst�t�dS�N)r�rmtree�dirnamerrrr�cleaunup_test_dir srcCst�t�t�dSr)r�os�mkdirrrrrr�setup_test_dir#src@s�eZdZddddddd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd d!�Zd"d#�Zd$S)%�AnyDBMTestCase�Python:sProgrammingstheswaysGuidosintended)�a�b�c�d�f�gcCs8t�td�}|jD]}|j|||�d�<q	|��dS)N�n�ascii)rr�_fname�_dict�encode�close)�selfr�krrr�init_db1s
zAnyDBMTestCase.init_dbcCs4tdd�|��D��}t|j���}|�||�|S)Ncss�|]}|�d�VqdS)r!N)�decode)�.0r'rrr�	<genexpr>8s�z-AnyDBMTestCase.keys_helper.<locals>.<genexpr>)�sorted�keysr#�assertEqual)r&rr-�dkeysrrr�keys_helper7szAnyDBMTestCase.keys_helpercCs|�t|jjt��dSr)�
assertTrue�
issubclass�module�error�OSError�r&rrr�
test_error=szAnyDBMTestCase.test_errorcCs|�tjtjt�dSr)�assertRaisesrr4rr"r6rrr�test_anydbm_not_existing@sz'AnyDBMTestCase.test_anydbm_not_existingcCsVt�td�}|�t|���g�|jD]}|j|||�d�<q|�|�|�	�dS)Nrr!)
rrr"r.�listr-r#r$�read_helperr%�r&r�keyrrr�test_anydbm_creationCs

z#AnyDBMTestCase.test_anydbm_creationcCsLt�t�t�td��}|�t|�d�Wd�dS1swYdS)Nr r)r�create_empty_filer"rrr.�len�r&rrrr�8test_anydbm_creation_n_file_exists_with_invalid_contentsKs
"�zGAnyDBMTestCase.test_anydbm_creation_n_file_exists_with_invalid_contentscCs`|��t�td�}d|jd<|d<|�|�|�|�dd�d�|�|dd�|��dS)Nrsindentedr�g�xxx�foo)	r(rrr"r#r;r.�
setdefaultr%rArrr�test_anydbm_modificationQs
z'AnyDBMTestCase.test_anydbm_modificationcCs�|��t�td�}|�|�|�|�d�|jd�|�|�dd�d�|�|�d��|�	t
��|dWd�n1sAwY|��dS)N�r�arrDrE)r(rrr"r;r.�getr#�assertIsNoner8�KeyErrorr%rArrr�test_anydbm_read[s

�zAnyDBMTestCase.test_anydbm_readcCs*|��t�td�}|�|�}|��dS)NrH)r(rrr"r0r%)r&rr-rrr�test_anydbm_keysgs
zAnyDBMTestCase.test_anydbm_keyscCs�ttjdd�dkr|�d�t�td�}|�|��g�d|d<|�|��dg�|�d|�|�|dd�|�|�	d�d�|�|�
d�d�|��dS)N�libraryzBerkeley DBzCBerkeley DB doesn't distinguish the empty value from the absent oner�sempty)�getattrr�_defaultmod�skipTestrr"r.r-�assertInrJrFr%rArrr�test_empty_valuems
zAnyDBMTestCase.test_empty_valuecCsF|��t�td�}d�d�}|�||�||dksJ�|��dS)NrHrr!r)r(rrr"r$rTr%r<rrr�test_anydbm_access{s
z!AnyDBMTestCase.test_anydbm_accesscCs6|�|�}|jD]}|�|j|||�d��qdS)Nr!)r0r#r.r$)r&rr-r=rrrr;�s

�zAnyDBMTestCase.read_helpercs�t�td��V�|����g�ddg}|D]\}}|�|<q|�t����tdd�|D���|D]\}}|�|��|��||�q1|�d��|�t	�fdd��Wd�dS1s_wYdS)	Nr)rI�b)s12345678910s019237410982340912840198242css�|]\}}|VqdSrr)r*r'�vrrrr+�s�z+AnyDBMTestCase.test_keys.<locals>.<genexpr>rDcs�dS)NrDrr�rrr�<lambda>�sz*AnyDBMTestCase.test_keys.<locals>.<lambda>)
rrr"r.r-r,rT�assertNotInr8rL)r&rr'rXrrYr�	test_keys�s
""�zAnyDBMTestCase.test_keyscCs.|�ttdtj�|jt_|�t�t�dS)NrR)�
addCleanup�setattrrrRr3rrr6rrr�setUp�s

zAnyDBMTestCase.setUpN)�__name__�
__module__�__qualname__r#r(r0r7r9r>rBrGrMrNrUrVr;r\r_rrrrr(s,�

rc@s2eZdZdd�Zejedd�dd��Zdd�Zd	S)
�WhichDBTestCasec	Cs�|�ttdtj�t�D]]}|j}t�|t_|�td��Wd�n1s(wY|�	||j�
t��|�td��}d|d<|�d|�|�	|dd�Wd�n1sZwY|�	||j�
t��qdS)NrRr�w�1)r]r^rrRrr`rrr"r.�whichdbrT)r&r3rrrrr�test_whichdb�s
,��zWhichDBTestCase.test_whichdbzTest requires ndbm)�reasoncCsDttdd��Wd�n1swY|�|j�t��dS)Nz.db�wb)rr"rKrrfr6rrr�test_whichdb_ndbm�s.z!WhichDBTestCase.test_whichdb_ndbmcCs |�t�t�t�d�|_dS)Nr)r]rrr�import_fresh_modulerr6rrrr_�s
zWhichDBTestCase.setUpN)	r`rarbrg�unittest�
skipUnlessrrjr_rrrrrc�s

rczdbm.��	TestCase_r3�__main__)�__doc__rlrr�test.supportrrrr
�TESTFNr�path�joinr"rrrr�TestCasercr
r`�
startswith�suffix�testname�type�globals�mainrrrr�<module>s:�t
!
��

Youez - 2016 - github.com/yon3zu
LinuXploit