HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/python3.6/test/__pycache__/test_binhex.cpython-36.pyc
3


 \��@sLdZddlZddlZddlmZGdd�dej�Zdd�ZedkrHe�dS)	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)�supportc@s0eZdZdd�Zdd�ZdZdd�Zdd	�Zd
S)�BinHexTestCasecCs(tjd|_tjd|_tjd|_dS)N�1�2ZPvery_long_filename__very_long_filename__very_long_filename__very_long_filename__)rZTESTFN�fname1�fname2�fname3)�self�r
�#/usr/lib64/python3.6/test_binhex.py�setUp
szBinHexTestCase.setUpcCs(tj|j�tj|j�tj|j�dS)N)r�unlinkrrr)r	r
r
r�tearDownszBinHexTestCase.tearDownsJack is my herocCsnt|jd�}|j|j�|j�tj|j|j�tj|j|j�t|jd�}|j�}|j�|j	|j|�dS)N�wb�rb)
�openr�write�DATA�close�binhexrZhexbin�readlineZassertEqual)r	�fZfinishr
r
r�test_binhexszBinHexTestCase.test_binhexcCs0t|jd�}|j�|jtjtj|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)rrrZassertRaisesr�Errorr)r	Zf3r
r
r�"test_binhex_error_on_long_filename(sz1BinHexTestCase.test_binhex_error_on_long_filenameN)�__name__�
__module__�__qualname__rrrrrr
r
r
rrs
rcCstjt�dS)N)rZrun_unittestrr
r
r
r�	test_main2sr�__main__)	�__doc__rZunittestZtestrZTestCaserrrr
r
r
r�<module>s'