python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_dbm_gnu.cpython-311.opt-1.pyc

eJddlmZddlmZmZejdZddlZddlZddl	m
Z
mZmZm
Z
e
ZGddejZedkrejdSdS)	)support)
import_helpercpython_onlyzdbm.gnuN)TESTFNTESTFN_NONASCIIunlinkFakePathceZdZedZdZdZedZdZ	dZ
dZdZd	Z
d
ZdZdZejed
dZdZdZdZdZdS)TestGdbmcvtjr,	ddlm}t	d|dS#t
$rYdSwxYwdS)Nr)
_GDBM_VERSIONzgdbm version: )rverbose_gdbmr
printImportError)versions E/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_dbm_gnu.py
setUpClasszTestGdbm.setUpClasssp?	2
2::::::0w0011111



	2	2s(
66cd|_dSNgselfs rsetUpzTestGdbm.setUps
cn|j|jttdSr)rcloserfilenamers rtearDownzTestGdbm.tearDowns-6FLLNNNxrcttd|_t	j|t
|jdSNc)gdbmopenrrrcheck_disallow_instantiationtypers rtest_disallow_instantiationz$TestGdbm.test_disallow_instantiations:8S)),T4<<@@@@@rc ttd|_||jgd|jd<d|jd<d|jd<t
|j}||t
gd|d|j|d	|j||jdd|j}|rG||||	||j
|}|G||jd	d
||jd||jddd|
t5|jd
dddn#1swxYwY||jddd||jdddS)Nr#ba01923741098234091284019824212345678910sdatabytes)ar.s12345678910r/bsxxxsfooxxx)r$r%rrassertEqualkeyssetassertInfirstkeyremovenextkeygetassertIsNoneassertRaisesKeyError
setdefault)rkey_setkeys   rtest_key_methodszTestGdbm.test_key_methods$sg8S))+++s =}"xdfkkmm$$#&F&F&F"G"GHHH

c46"""

dDF###)7333foo	&MM#w'''NN3&..%%C	&
	
D))4000$&**V,,---FF33V<<<


x
(
(		F5MM															**66::FCCC00000sH33H7:H7ctttjtjtdttd_jtjfdtjddS)Nrr#cjdS)Nr+rrsr<lambda>z0TestGdbm.test_error_conditions.<locals>.<lambda>Ds
dfSkrcfttdS)Nrx)r$r%rrrrrDz0TestGdbm.test_error_conditions.<locals>.<lambda>Fs dii$.G.G.M.M.O.Or)rrr;r$errorr%rrrs`rtest_error_conditionszTestGdbm.test_error_conditions=sx$*di3???8S))$*&9&9&9&9:::$*&O&OPPPPPrcttj}|tdz
}t|D]@}tt
||_|jA|tdz
}|D]H}|D]C}tt
||z|_|jDIdS)Nfsucrwn)r4r$
open_flagssortedr%rrr)rallmodesmodeflagsflags      r
test_flagszTestGdbm.test_flagsHs$/""c%jj 5MM		DYYx..DFFLLNNNNc&kk!		D

8TD[99
		rcttd|_tjt}t|d}d|z|jd<tjt}||||jd=|	tjt||j
tjt}||||||dS)Nr#i'x)
r$r%rrospathgetsizemax
assertGreaterr2
reorganize
assertLessassertGreaterEqual)rsize0
value_sizesize1size2s     rtest_reorganizezTestGdbm.test_reorganizeXs8S))))
&&
J&s))5%(((F3K22E:::))u%%%u-----rcBttd5}d|d<dddn#1swxYwYttd5}|t	|dgdddn#1swxYwY|tj5}|dddn#1swxYwY|t|j	ddS)Nr#zcontext managerzgdbm context managerrBsgdbm context managerz#GDBM object has already been closed)
r$r%rr2listr3r;rHstr	exception)rdbcms   rtest_context_managerzTestGdbm.test_context_managerms
YYx
%
%	;):B%&	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;YYx
%
%	IT"''))__/F.GHHH	I	I	I	I	I	I	I	I	I	I	I	I	I	I	I

tz
*
*	bGGIII															R\**>	@	@	@	@	@s03777B!!B%(B%C,,C03C0cttd5}d|d<dddn#1swxYwYttd5}|t	|dg|d|v||ddddddS#1swxYwYdS)Nr#s
bytes value sbytes key rB)r$r%rr2rer3
assertTruerrhs  r
test_byteszTestGdbm.test_bytesysX
YYx
%
%	8$7B !	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8
YYx
%
%	IT"''))__/@.ABBBOO-3444R 124GHHH	I	I	I	I	I	I	I	I	I	I	I	I	I	I	I	I	I	Is377A*CCCcttd5}d|d<dddn#1swxYwYttd5}|t	|dg|d|v|d|v||dd||ddddddS#1swxYwYdS)Nr#uUnicode value 🐍uUnicode key 🐍rB)r$r%rr2rer3encoderlrms  rtest_unicodezTestGdbm.test_unicodes
YYx
%
%	F+EB'(	F	F	F	F	F	F	F	F	F	F	F	F	F	F	F
YYx
%
%	BT"''))__/G/N/N/P/P.QRRROO4;;==CDDDOO4:;;;R 8 ? ? A AB7>>@@
B
B
BR 897>>@@
B
B
B
	B	B	B	B	B	B	B	B	B	B	B	B	B	B	B	B	B	Bs377C7E""E&)E&cRttd5}d|d<dddn#1swxYwYttd5}|tj5|d=dddn#1swxYwY|tj5|d=dddn#1swxYwY|tj5d|d<dddn#1swxYwYddddS#1swxYwYdS)Nr#sbytes values	bytes keyrBs
not exist keysnot exist value)r$r%rr;rHrms  rtest_write_readonly_filez!TestGdbm.test_write_readonly_filesD
YYx
%
%	.-B|	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.
YYx
%
%	:""4:..
)
)'(
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)""4:..
%
%|$
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%""4:..
:
:'9#$
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:s377 D>BDB	DB	"D8C<DC	DC	"D2D8DD	DD	DD #D z*requires OS support of non-ASCII encodingscXt}|t|t|d5}d|d<dddn#1swxYwY|tj|t|d5}|	t|dg|d|v|	|ddddddS#1swxYwYdS)Nr#svalueskeyrB)r
addCleanuprr$r%rlrWrXexistsr2rer3)rrrhs   rtest_nonascii_filenamezTestGdbm.test_nonascii_filenamesw#)))
YYx
%
%	"!BvJ	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"x00111
YYx
%
%	3T"''))__vh777OOFbL)))RZ222	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3s$AAA(A*DD#&D#c<d}|tj5}t|dddn#1swxYwY||t|j||jj|dS)Nznonexisting-file)	r;r$rHr%r5rfrgr2r)rnonexisting_fileris   rtest_nonexisting_filezTestGdbm.test_nonexisting_files-


tz
*
*	(bII&'''	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(

&BL(9(9:::.0@AAAAAsA		A
A
ctttddSr")r$r%r	rrrs rtest_open_with_pathlib_pathz$TestGdbm.test_open_with_pathlib_paths0		(8$$c**0022222rcttjtddSr")r$r%rWfsencoderrrs rtest_open_with_bytes_pathz"TestGdbm.test_open_with_bytes_paths2		"+h''--3355555rctttjt
ddSr")r$r%r	rWr~rrrs r!test_open_with_pathlib_bytes_pathz*TestGdbm.test_open_with_pathlib_bytes_paths:		(2;x0011377==?????rN)__name__
__module____qualname__staticmethodrrr rr(r@rIrTrcrjrnrqrsunittest
skipUnlessrrwrzr|rrrGrrrrsg22\2
AA\A
1112	Q	Q	Q ...*
@
@
@III
B
B
B	:	:	:XEGG	3	3GG	3BBB333666@@@@@rr__main__)testrtest.supportrr
import_moduler$rrWtest.support.os_helperrrrr	rTestCaserrmainrGrr<module>rs44444444"}"9--				LLLLLLLLLLLLh@h@h@h@h@x h@h@h@VzHMOOOOOr