403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.175
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_dbm_dumb.cpython-315.opt-1.pyc
R
>lqj�:c���Qs]PHs]PHs]PHs]PHs]PHs]PHs]PHGs	]QH(Gs]QH0G
s
]QH8Gs\
O sQsQQ\O&2s\Q6Xc\O,2P!P!)z>Test script for the dumbdbm module
Original by Roger E. Masse
)�support)�	os_helper)�partialc��QFD%o[O[U*2J'	P![cJ9h9h)�.dir�r�.dat�.bak)�os�unlink�_fname�OSError)�exts �'C:\Python315\\Lib\test\test_dbm_dumb.py�
_delete_filesrs5��'��	��I�I�f�s�l�#�(���	��	�s�!0�	?�?�?c��`�\sQs]snQQQQQQQQQ	Q
QQQ
QQO	Q2Q-sQs\O\	\
Q2Q2\OQ22s
QsQsQsQsQsQsQsQsQsQsQ sQ!sQ"sQ#sQ$sQ%sQ&sQ'sQ(s Q)s!Q*s"Q+s#\OQ,2s$\O\OJQ-2Q.2s&Q/s'Q0s(Q1s)Q2s*Q3s+Q4s,Us-P!)5�DumbDBMTestCase�0��asPython:�bsProgramming�csthe�dsway�fsGuido�gsintended�ü�utf-8�!c�v�[O[O[Q229^tt^2oUO[
UO22,2UOFDoUOU*V$J	UOU2PPP2P!)%fhP!9h��c)
�
contextlib�closing�dumbdbm�openr�assertEqual�list�keys�_dict�read_helper)�self�f�keys&  r�test_dumbdbm_creation�%DumbDBMTestCase.test_dumbdbm_creation%st��
�
�
����V�S� 9�
:�
:�a����T�!�&�&�(�^�R�0��z�z�����C����"����Q��	;�
:�
:�
:�s�A$B'�'B8	�0B8	�umaskztest needs os.umask()c�^�[O]2o[O[QQ2oUO2[OU2Qo[OQ6wcQo]PHo[O[Q*2oUOUOUO2U2[O[Q*2oUOUOUO2U2P![OW2h9h)�r���posix�rr)r	r.r"r#r�close�name�statr$�S_IMODE�st_mode)r)�	old_umaskr*�
expected_moder7�sts&     r�test_dumbdbm_creation_mode�*DumbDBMTestCase.test_dumbdbm_creation_mode,s���	 ������I����V�S�%�0�A�
�G�G�I��H�H�Y���
�
�7�7�g��"�M��
�W�W�V�f�_�
%��������b�j�j�1�=�A�
�W�W�V�f�_�
%��������b�j�j�1�=�A��
�H�H�Y��s�AD�D,c��[O[2oQUQ$UOUQ*Q2UO	2UO	2P!)rr)r"r#rr$r5�r)r*s& r�test_close_twice� DumbDBMTestCase.test_close_twiceBs?���L�L�� ����$������4��$�'�	���	�	���	rc��UO2[O[O[
Q229^tt^2oQ9UOQ$UQ$UOU2UOUOQQ2Q2UOUQ*Q2PPP2P!)%fhP!9h)�wsindentedr�xxx�foo)
�init_dbr r!r"r#rr'r(r$�
setdefaultr@s& r�test_dumbdbm_modification�)DumbDBMTestCase.test_dumbdbm_modificationIs�������
�
�
����V�S� 9�
:�
:�a�)4�4�D�J�J�t��q��w����Q�����Q�\�\�&�&�9�6�B����Q�v�Y��/�;�
:�
:�
:�s�	A!B4�4C	�=C	c	�~�UO2[O[O[
Q229^tt^2oUO
U2UO[OQ29^tt^2QUQ$PPP2UO[OQ29^tt^2UQPPP2UOUOQ2UOQ*2UOUOQQ2Q2UOUOQ22UO[29^tt^2UQ*PPP2PPP2P!)%fhK�9h)%fhK�9h)%fhK@9h)%fhP!9h)�rz'The database is opened for reading only�xrrrErF)rGr r!r"r#rr(�assertRaisesRegex�errorr$�getr'�assertIsNone�assertRaises�KeyErrorr@s& r�test_dumbdbm_read�!DumbDBMTestCase.test_dumbdbm_readRs9������
�
�
����V�S� 9�
:�
:�a����Q���'�'��
�
�$M�O�O���$��O��'�'��
�
�$M�O�O��d�G�O�
���Q�U�U�4�[�$�*�*�T�*:�;����Q�U�U�6�6�2�F�;����a�e�e�F�m�,��"�"�8�,�,��&�	�-�;�
:�O�O��O�O��-�,��;�
:�
:�sm�	:F+�E2	�	0F+�9F	�=BF+�
F	� F+�2F
�;F
�=F+�F
�F
�F+�F(
�!F(
�#F+�+F<	�4F<	c���UO2[O[O[
229^tt^2oUO
U2oPPP2P!)%fhP!9h�N)rGr r!r"r#r�keys_helper)r)r*r&s&  r�test_dumbdbm_keys�!DumbDBMTestCase.test_dumbdbm_keyscsF������
�
�
����V� 4�
5�
5���#�#�A�&�D�6�
5�
5�
5�s�A$�$A5	�-A5	c���[O[O[229^tt^2oQUQ$UOQU2PPP2P!)%fhP!9h)�hello�1)r r!r"r#r�assertInr@s& r�test_write_contains�#DumbDBMTestCase.test_write_containshsD��
�
�
����V� 4�
5�
5���A�d�G��M�M�$��"�6�
5�
5�
5�s�A�A+	�#A+	c��[O[O[229^tt^2oQUQ$QUQ$PPP2[O[O[229^tt^2oUOUQ*Q2PPP2P!)%fhKj9h)%fhP!9h)r\r]�hello2)r r!r"r#rr$r@s& r�test_write_write_read�%DumbDBMTestCase.test_write_write_readms���
�
�
����V� 4�
5�
5���A�d�G��A�d�G�6��
�
����V� 4�
5�
5�����Q�t�W�i�0�6�
5�6�
5��6�
5�
5�s#�B%�B8�%B5	�.B5	�8C		�C		c	�B�UO2[O[O[
Q229^tt^2oUO
UQ*UOQOQ2*2PPP2P!)%fhP!9h)rLrr)	rGr r!r"r#rr$r'�encoder@s& r�
test_str_read�DumbDBMTestCase.test_str_readus^������
�
�
����V�S� 9�
:�
:�a����Q�x�[�$�*�*�X�_�_�W�5M�*N�O�;�
:�
:�
:�s�	:B
�
B	�B	c	�n�UO2[O[O[
229^tt^2oQUQ$QUQ$PPP2[O[O[
Q229^tt^2oUO
QU2UOUQOQ2*UOQOQ2*2UOUQ*Q2PPP2P!)%fhK�9h)%fhP!9h)rr�a�1rLrr]r)
rGr r!r"r#rr^r$rfr'r@s& r�test_str_write_contains�'DumbDBMTestCase.test_str_write_containszs�������
�
�
����V� 4�
5�
5���A�h�K��A�c�F�6��
�
����V�S� 9�
:�
:�a��M�M�(�A�&����Q�x���w�7�8�!�Z�Z�����(@�A�
C����Q�t�W�d�+�	;�
:�6�
5��;�
:�
:�s%�D�A4D#�D 	�D 	�#D4	�,D4	c�(�[O[O[229^tt^2oQUQ$QUQ$PPP2[
O[Q*Q29^tt^2oUO
2oPPP2[OQ6XcWOQQ2oLWOQQ2o[
O[Q*Q	29^tt^2oUOU2PPP2[O[2oUOUQ*Q2UOUQ*Q2P!)%fhCK 9h)%fhK�9h)%fhK�9h)
r\r]rb�2r�rb�
�
s
�wb)r r!r"r#r�io�readr	�linesep�replace�writer$)r)r*�file�datas&   r�test_line_endings�!DumbDBMTestCase.test_line_endings�s
���
�
����V� 4�
5�
5���A�d�G��A�d�G�6�
�W�W�V�f�_�d�
+�
+�t��9�9�;�D�,�
�:�:����<�<��w�/�D��<�<���/�D�
�W�W�V�f�_�d�
+�
+�t��J�J�t��,�
�L�L�� ������4��(�+�����4��)�,�!6�
5�
5��
,�
+��,�
+�s5�E�5E.�2F�E+	�#E+	�.E>	�7E>	�F	�
F	c��UOU2oUOFD,oUOUOU*V*2J.	P!rW)rXr'r$)r)r*r&r+s&&  rr(�DumbDBMTestCase.read_helper�s:������"���:�:�C����T�Z�Z��_�a�f�5�rc��[O[O[Q229^tt^2oUO
FDoUO
U*V$J	PPP2P!)%fhP!9h��n)r r!r"r#rr'�r)r*�ks&  rrG�DumbDBMTestCase.init_db�sL��
�
�
����V�S� 9�
:�
:�a��Z�Z���z�z�!�}��� �;�
:�
:�
:�s�*A-�-A>	�6A>	c��[UO22o[UOO22oUOV#2U!rW)�sortedr&r'r$)r)r*r&�dkeyss&&  rrX�DumbDBMTestCase.keys_helper�s:���a�f�f�h����t�z�z���(�)������%��rc
�8�]PHo-o[]2FCDYo[O[O
[229^tt^2o[]d2FD~oUOQ2oUO2Q6cVR7cV%VEJ5J7UOQ2UOQ2*oVbU$VdU$UOVE*U2J�	PPP2[O[O
[229^tt^2o[QUO222o[UO22oUOVx2PPP2CJ\	P!)%fhK�9h)%fhCJ�9h)��
abcdefghijklmg�������?i'c3�X�SF �DvqUOQ2U1w�	J	P!3h)zlatin-1)rf)�.0r��vs&  r�	<genexpr>�.DumbDBMTestCase.test_random.<locals>.<genexpr>�s ��y���y�t�q�1�8�8�I�#6��":�y�s�#*)rrr)�random�ranger r!r"r#r�choice�	randranger$r��items)	r)r��d�dummyr*r�r��expected�gots	&        r�test_random�DumbDBMTestCase.test_random�s(������1�X�X�E��#�#�G�L�L��$8�9�9�Q�"�3�Z�E��
�
�o�6�A��}�}���,��6� !�� !��"�#�M�M�*<�=��@P�@P�QV�@W�W�� �!�� �!���(�(���q�1�(�:��#�#�G�L�L��$8�9�9�Q�!�!Q�q�w�w�y�!Q�Q���Q�W�W�Y�'��� � ��/�:�9��9�9��:�9�9�s2�5E4	�E4	�
AE4	�A
F	�4F
�=F
�F
�F
c�
�[O[Q29^tt^2oQUQ$PPP2[O[Q29^tt^2oUO[	UO22Q,2PPP2UO
[O29^tt^2WO2PPP2P!)%fhK�9h)%fhKe9h)%fhP!9h)rzcontext managerzdumbdbm context managerrLsdumbdbm context manager)r"r#rr$r%r&rRrO)r)�dbs& r�test_context_manager�$DumbDBMTestCase.test_context_manager�s���
�\�\�&�#�
&�
&�"�,=�B�(�)�'��\�\�&�#�
&�
&�"����T�"�'�'�)�_�/I�.J�K�'��
�
�w�}�}�
-�
-��G�G�I�.�
-�
'�
&��'�
&��.�
-�
-�s5�C�+C�0C1�C	�C	�C.	�'C.	�1D	�:D	c	��[O[Q2oUO2[	[
OU2[	[
OUQ2[	[
OU2[	[
OU21FD`oUO[O29^tt^2oUQ2PPP2UO[WO2Q2Jb	[
OQ2[
OQ2[
OQ2[ 1FD`oUO[O29^tt^2oUU2PPP2UO[WO2Q2Jb	P!)%fhK�9h)%fhKN9h)r�b�testz"DBM object has already been closedr&�iterkeysr�)r"r#rr5r�operator�delitem�setitem�getitem�containsrRrOr$�str�	exception�methodcaller�len)r)r*�meth�cms&   r�test_check_closed�!DumbDBMTestCase.test_check_closed�s:���L�L���%��	���	��X�-�-�q�1��X�-�-�q�#�6��X�-�-�q�1��X�.�.��2�4�D��"�"�7�=�=�1�1�R��V��2����S����.�A�
C�
4��*�*�6�2��*�*�:�6��*�*�7�3���D��"�"�7�=�=�1�1�R��Q��2����S����.�A�
C�
�2�1��2�1�s$�?	F&	�*	F9	�&F6
�/F6
�9G	
�G	
c��[O[Q29^tt^2oUOFDoUOU*V$J	PPP2[O[Q29^tt^2oUO	UO2,2PPP2P!)%fhK^9h)%fhP!9hr�)r"r#rr'r$r&r�s&  r�test_create_new�DumbDBMTestCase.test_create_new�s��
�\�\�&�#�
&�
&�!��Z�Z���z�z�!�}��� �'��\�\�&�#�
&�
&�!����Q�V�V�X�r�*�'�
&�	'�
&��'�
&�
&�s#�*B%�:!B8�%B5	�.B5	�8C		�C		c�H�[[Q*QQQ59^tt^2oUOQ2PPP2[O29^tt^2oUO[29^tt^2[O[29^tt^2oPPP2PPP2UOUO2P2PPP2P!)%fhK�9h)%fhKU9h)%fhK`9h)%fhP!9h)rrDr)�encodingzstr(print('Hacked!')), 0
)
r#rrxr�captured_stdoutrR�
ValueErrorr"r$�getvalue)r)�stream�stdoutr*s&   r�	test_eval�DumbDBMTestCase.test_eval�s���
�&�6�/�3��
9�
9�V��L�L�5�6�:�
�
$�
$�
&�
&�&��"�"�:�.�.��\�\�&�)�)�Q��*�/�
���V�_�_�.��3�	'�
&�:�
9��*�)��/�.��'�
&�
&�s_�C�D�8#C=	�C*
�C=	�%(D�C'	� C'	�*C:�3C:�5C=	�=D

�D

�D�D!	�D!	c
� �QFD�o[2UO[29^tt^2[O[
U2PPP2UO
[OO[
Q*22UO
[OO[
Q*22UO
[OO[
Q*22J�	QFCDo[2[O[
U29^tt^2oUO[OO[
Q*22UO[OO[
Q*22UO
[OO[
Q*22PPP2UO
[OO[
Q*22CJ!	QFCD#o[2[O[
U29^tt^2oQUQ$UO[OO[
Q*22UO[OO[
Q*22UO
[OO[
Q*22PPP2UO[OO[
Q*22CJ&	P!)%fhCK9h)%fhCK�9h)%fhKx9h)rLrrr�valuer+�rLrD�rr�)rrR�FileNotFoundErrorr"r#r�assertFalser	�path�exists�
assertTrue)r)r�r*s&  r�test_missing_data�!DumbDBMTestCase.test_missing_data�s���E��O��"�"�#4�5�5����V�U�+�6����R�W�W�^�^�F�V�O�<�=����R�W�W�^�^�F�V�O�<�=����R�W�W�^�^�F�V�O�<�=�
 � �E��O����f�e�,�,����������v��� ?�@���������v��� ?�@�� � ���������!@�A�-�
���R�W�W�^�^�F�V�O�<�=�
 � �E��O����f�e�,�,��"��%����������v��� ?�@���������v��� ?�@�� � ���������!@�A�	-�

�O�O�B�G�G�N�N�6�F�?�;�<� �6�5�5��-�,�,��-�,�s7�M	�6B,M)	�B1M=	�M&
�M&
�)M:
�2M:
�=N

�N

c
��[O[Q29^tt^2oPPP2[O[Q*2QFD�oUO[29^tt^2[O[U2PPP2UO[OO[Q*22UO[OO[Q*22J�	QFD�o[O[U29^tt^2oUO[OO[Q*22UO[OO[Q*22PPP2UO[OO[Q*22[O[Q*2J�	QFCD"o[O[U29^tt^2oQUQ$UO[OO[Q*22UO[OO[Q*22PPP2UO[OO[Q*22[O[Q*2[O[Q*2CJ%	P!)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhK�9h)r�rrr�r+r�r�)r"r#rr	r
rRr�r�r�r�r��r)r*r�s&  r�test_missing_index�"DumbDBMTestCase.test_missing_indexs��
�\�\�&�#�
&�
&�!��'�
�	�	�&�6�/�"��E��"�"�#4�5�5����V�U�+�6����R�W�W�^�^�F�V�O�<�=����R�W�W�^�^�F�V�O�<�=�	 � �E����f�e�,�,����������v��� ?�@�� � ���������!@�A�-�
���R�W�W�^�^�F�V�O�<�=��I�I�f�v�o�&� � �E����f�e�,�,��"��%����������v��� ?�@�� � ���������!@�A�-�
�O�O�B�G�G�N�N�6�F�?�;�<��I�I�f�v�o�&��I�I�f�v�o�&� �!'�
&�
&��6�5�5��-�,�,��-�,�sI�L;�3M	�6A3M#	�9A8M7	�;M	�M	�M 
�M 
�#M4
�,M4
�7N
�N
c
�t�[O[Q29^tt^2oPPP2[O[Q*2QFCD9o[O[U29^tt^2oUO[OO[Q*22UO[OO[Q*22UO2UO[OO[Q*22UO[OO[Q*22[O[Q*2UO2UO[OO[Q*22UO[OO[Q*22PPP2UO[OO[Q*22UO[OO[Q*22CJ<	P!)%fhCKu9h)%fhK�9h)r�rrr��
r"r#rr	r
r�r�r�r��syncr�s&  r�test_sync_empty_unmodified�*DumbDBMTestCase.test_sync_empty_unmodified(s|��
�\�\�&�#�
&�
&�!��'�
�	�	�&�6�/�"��E����f�e�,�,����������v��� ?�@�� � ���������!@�A�������������v��� ?�@�� � ���������!@�A��	�	�&�6�/�*������ � ���������!@�A�� � ���������!@�A�-�
���R�W�W�^�^�F�V�O�<�=����R�W�W�^�^�F�V�O�<�=� �'�
&�
&��-�,�s$�J�:FJ'	�J$	�J$	�'J7
�0J7
c
��[O[Q29^tt^2oPPP2[O[Q*2QFCD_o[O[U29^tt^2oQUQ$UO[OO[Q*22UO[OO[Q*22UO2UO[OO[Q*22UO[OO[Q*22[O[Q*2[O[Q*2UO2UO[OO[Q*22UO[OO[Q*22PPP2UO[OO[Q*22UO[OO[Q*22CJb	P!)%fhCK�9h)%fhK�9h)r�rr�r+rr�r�r�s&  r�test_sync_nonempty_unmodified�-DumbDBMTestCase.test_sync_nonempty_unmodified:s���
�\�\�&�#�
&�
&�!��'�
�	�	�&�6�/�"��E����f�e�,�,��"��%����������v��� ?�@�� � ���������!@�A�������������v��� ?�@���������v��� ?�@��	�	�&�6�/�*��	�	�&�6�/�*������ � ���������!@�A�� � ���������!@�A�-�
���R�W�W�^�^�F�V�O�<�=����R�W�W�^�^�F�V�O�<�=� �'�
&�
&��-�,�s$�J9�:F>K
	�9K
	�K
	�
K
�K
c	���QFDEoUO[Q29^tt^2[O[U2PPP2JG	P!)%fhJ\9h)�xz)Flag must be one of 'r', 'w', 'c', or 'n')r��rfN)rNr�r"r#r)r)�flags& r�test_invalid_flag�!DumbDBMTestCase.test_invalid_flagNsX��%�D��'�'�
�)@�A�A����V�T�*�A�A�&�A�A�A�s�A	�A!
�A!
c
�
�[O29^tt^2o[OO	UQ2o[
OUQ29^tt^2oUO[UO22,2UOFDoUOU*V4$J	PPP2[OUQ*[O2[OUQ*[O2[OU[O[O*2[
OUQ29^tt^2oUO[UO22[UO22UO!2PPP2PPP2P!)%fhCK!9h)%fhK.9h)%fhP!9h)r�r�rrrL)r�temp_dirr	r��joinr"r#r$r%r&r'�chmodr7�S_IRUSR�S_IXUSRr�r5)r)�dir�fnamer*r+s&    r�test_readonly_files�#DumbDBMTestCase.test_readonly_filesUs+��
�
�
�
!�
!�S��G�G�L�L��d�+�E����e�S�)�)�Q�� � ��a�f�f�h���4��:�:�C�!�Z�Z��_�A�F�&�*�
�H�H�U�V�^�T�\�\�2��H�H�U�V�^�T�\�\�2��H�H�S�$�,�,�t�|�|�3�4����e�S�)�)�Q�� � ������!1�6�$�*�*�3E�F����	�*�"�
!�)�)�)��*�)��"�
!�
!�sQ�AG1�AG
	�2B9G1�+A
G	�8G1�
G
�G
�	G1�G.
�'G.
�)G1�1H	�:H	z*requires OS support of non-ASCII encodingsc��[OoQFD)oUO[OV*2J+	[O
UQ29^tt^2oQUQ$PPP2UO
[OOUQ*22UO
[OOUQ*22[O
UQ29^tt^2oUO[UO22Q,2UO
QU72UOUQ*Q2PPP2P!)%fhK�9h)%fhP!9h)rrrsvalueskeyrLr)
r�TESTFN_NONASCII�
addCleanupr
r"r#r�r	r�r�r$r%r&)r)�filename�suffixr�s&   r�test_nonascii_filename�&DumbDBMTestCase.test_nonascii_filenameds����,�,��.�F��O�O�I�,�,�h�.?�@�/�
�\�\�(�C�
(�
(�B�!�B�v�J�)���������x�&�'8�9�:���������x�&�'8�9�:�
�\�\�(�C�
(�
(�B����T�"�'�'�)�_�v�h�7��O�O�F�b�L�)����R��Z��2�)�
(�	)�
(��)�
(�
(�s%�!E�8AE-�E*	�#E*	�-E>	�6E>	c��[O[O[2Q2O2P!r)r"r#r�FakePathrr5�r)s&r�test_open_with_pathlib_path�+DumbDBMTestCase.test_open_with_pathlib_pathss$�����Y�'�'��/��5�;�;�=rc��[O[O[2Q2O2P!r)r"r#r	�fsencoderr5r�s&r�test_open_with_bytes_path�)DumbDBMTestCase.test_open_with_bytes_pathvs"�����R�[�[��(�#�.�4�4�6rc��[O[O[O
[22Q2O2P!r)r"r#rr�r	r�rr5r�s&r�!test_open_with_pathlib_bytes_path�1DumbDBMTestCase.test_open_with_pathlib_bytes_pathys-�����Y�'�'����F�(;�<�c�B�H�H�Jrc��[2P!rW�rr�s&r�tearDown�DumbDBMTestCase.tearDown|����rc��[2P!rWr�r�s&r�setUp�DumbDBMTestCase.setUpr�r�).�__name__�
__module__�__qualname__�__firstlineno__rfr'r,�unittest�
skipUnless�hasattrr	r�skip_unless_working_chmodr=rArIrTrYr_rcrgrlr{r(rGrXr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��__static_attributes__�__classdictcell__)�
__classdict__s@rrrsQ����
�3�
�:�
�>�
�6�
�6�
�8�
�;�
�_�_�W�
%��
�E� ������W�-�/F�G��(�(�B�)�H�B�(�0��"'�
#�
1�P�
	,�-�,6�
%�
�0�,�C�,+�4�=�4'�4>�$>�(+��(�(��)������2�2�E�G�3�G�3�>�7�K���rr�__main__)�__doc__r rtr�r	r7r�dbm.dumb�dumbr"r�r�test.supportr�	functoolsr�TESTFNrr�TestCaserr�mainr�rr�<module>rsg����	��	�����"��	�	�	���f�h�'�'�f�R�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit