HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_tools/__pycache__/test_md5sum.cpython-311.opt-1.pyc
�

��Vc����dZddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZmZe��ej
dd�	��Gd
�dej����Zedkrej��dSdS)
z3Tests for the md5sum script in the Tools directory.�N)�	os_helper)�hashlib_helper)�assert_python_ok�assert_python_failure)�
scriptsdir�skip_if_missing�md5T)�opensslc�d�eZdZed���Zed���Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
S)�MD5SumTestsc��tj�td��|_tjtj��tj�tjd��|_t|jd��5}|�
d��ddd��n#1swxYwYd|_d|_dS)Nz	md5sum.pyz
md5sum.fodder�wbsmd5sum
test file
s d38dae2eb1ab346a292ef6850f9e1a0ds a8b07894e2ca3f2a4c3094065fa6e0a5)
�os�path�joinr�script�mkdirr�TESTFN_ASCII�fodder�open�write�
fodder_md5�fodder_textmode_md5)�cls�fs  �/D:\Python311\Lib\test\test_tools\test_md5sum.py�
setUpClasszMD5SumTests.setUpClasss����W�\�\�*�k�:�:��
�
���'�(�(�(��W�\�\�)�"8�/�J�J��
�
�#�*�d�
#�
#�	0�q�
�G�G�.�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�<���"E����s�
B/�/B3�6B3c�B�tjtj��dS)N)r�rmtreer)rs r�
tearDownClasszMD5SumTests.tearDownClasss�����/�0�0�0�0�0�c���t|j��\}}}|�|d��|�|�d����|�|��dS)Nrs(d41d8cd98f00b204e9800998ecf8427e <stdin>)rr�assertEqual�
assertTrue�
startswith�assertFalse��self�rc�out�errs    r�test_noargszMD5SumTests.test_noargssp��'���4�4���C������Q��������N�N�F�G�G�	I�	I�	I���������r!c��t|j|j��\}}}|�|d��|�|�|j����|j�tj	j
��D]*}|�|���|���+|�
|��dS)Nr)rrrr#r$r%r�splitrr�sep�assertIn�encoder&)r(r)r*r+�parts     r�test_checksum_fodderz MD5SumTests.test_checksum_fodder%s���'���T�[�A�A���C������Q����������t��7�7�8�8�8��K�%�%�b�g�k�2�2�	.�	.�D��M�M�$�+�+�-�-��-�-�-�-���������r!c��t|jd|j��\}}}|�|d��|�|j|��|j�tjj	��}|�|d�
��|��|�|d�
��|��dS)Nz-lr������)rrrr#r0rr.rrr/r1�assertNotIn)r(r)r*r+�partss     r�test_dash_lzMD5SumTests.test_dash_l-s���'���T�4�;�G�G���C������Q�����
�
�d�o�s�+�+�+���!�!�"�'�+�.�.���
�
�e�B�i�&�&�(�(�#�.�.�.�����r��)�)�+�+�S�1�1�1�1�1r!c��t|jd|j��\}}}|�|d��|�|�|j����|�|j|��dS)Nz-tr)	rrrr#r$r%rr7rr's    r�test_dash_tzMD5SumTests.test_dash_t5sr��'���T�4�;�G�G���C������Q����������t�'?�@�@�A�A�A������#�.�.�.�.�.r!c��t|jdd|j��\}}}|�|d��|�|j|��dS)Nz-s�512r)rrrr#r0rr's    r�test_dash_szMD5SumTests.test_dash_s;sQ��'���T�5�$�+�N�N���C������Q�����
�
�d�o�s�+�+�+�+�+r!c��t|j|j|j��\}}}|�|d��|���}|�t|��d��|j|�dS)Nr�)rrrr#�
splitlines�len)r(r)r*r+�liness     r�test_multiple_fileszMD5SumTests.test_multiple_files@sv��'���T�[�$�+�N�N���C������Q������� � ������U���Q�'�'�'����%� � � � r!c��t|jd��\}}}|�|d��|�|d��|�|d��dS)Nz-hr@r!)rrr#�
assertGreaterr's    r�
test_usagezMD5SumTests.test_usageGsa��,�T�[�$�?�?���C������Q��������c�"�"�"����3��$�$�$�$�$r!N)
�__name__�
__module__�__qualname__�classmethodrr r,r3r9r;r>rDrG�r!rrrs��������F�F��[�F��1�1��[�1�������2�2�2�/�/�/�,�,�,�
!�!�!�%�%�%�%�%r!r�__main__)�__doc__�sysr�unittest�test.supportrr�test.support.script_helperrr�test.test_toolsrr�requires_hashdigest�TestCaserrH�mainrLr!r�<module>rWs���9�9�
�
�
�
�	�	�	�	�����"�"�"�"�"�"�'�'�'�'�'�'�N�N�N�N�N�N�N�N�7�7�7�7�7�7�7�7������#��#�E�4�8�8�8�<%�<%�<%�<%�<%�(�#�<%�<%�9�8�<%�~�z����H�M�O�O�O�O�O��r!