Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.118.10.127
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_binhex.cpython-310.pyc
o

`bg�@s�dZddlZddlmZddlmZddlmZddlmZe�de	f��
e�
d�ZWd�n1s5wYGd	d
�d
ej�Z
dd�Zed
krPe�dSdS)z�Test script for the binhex C module

   Uses the mechanism of the python binhex module
   Based on an original test by Roger E. Masse.
�N)�support)�
import_helper)�	os_helper)�warnings_helper��binhexc@s8eZdZdd�Zdd�ZdZdd�Zdd	�Zd
d�ZdS)
�BinHexTestCasecCs(tjd|_tjd|_tjd|_dS)N�1�2ZPvery_long_filename__very_long_filename__very_long_filename__very_long_filename__)rZTESTFN_ASCII�fname1�fname2�fname3��self�r�9/usr/local/python-3.10/lib/python3.10/test/test_binhex.py�setUpszBinHexTestCase.setUpcCs(t�|j�t�|j�t�|j�dS�N)r�unlinkrrr
rrrr�tearDownszBinHexTestCase.tearDownsJack is my herocCs�t|jd��}|�|j�Wd�n1swYt�|j|j�t�|j|j�t|jd��}|��}Wd�n1sAwY|�|j|�dS)N�wb�rb)	�openr�write�DATArrZhexbin�readlineZassertEqual)r�fZfinishrrr�test_binhex s�
�zBinHexTestCase.test_binhexcCs0t|jd�}|��|�tjtj|j|j�dS)z�
        The testcase fails if no exception is raised when a filename parameter provided to binhex.binhex()
        is too long, or if the exception raised in binhex.binhex() is not an instance of binhex.Error.
        rN)rr
�closeZassertRaisesr�Errorr)rZf3rrr�"test_binhex_error_on_long_filename-sz1BinHexTestCase.test_binhex_error_on_long_filenamecCs�t|jd��}|�|j�Wd�n1swYt�|j|j�t|jd��}|��}Wd�n1s9wY|�d|�dS)Nrr�
)rrrrrr�readZassertNotIn)rr�fp�contentsrrr�test_binhex_line_endings7s�
�z'BinHexTestCase.test_binhex_line_endingsN)	�__name__�
__module__�__qualname__rrrrr r%rrrrrs

rcCst�t�dSr)rZrun_unittestrrrrr�	test_mainCsr)�__main__)�__doc__Zunittest�testrZtest.supportrrrZcheck_warnings�DeprecationWarningZimport_fresh_modulerZTestCaserr)r&rrrr�<module>s�2
�
© 2025 GrazzMean