HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/test_binhex.cpython-37.pyc
B

��g��@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/local/lib/python3.7/test/test_binhex.py�setUp
szBinHexTestCase.setUpcCs(t�|j�t�|j�t�|j�dS)N)r�unlinkrrr)r	r
r
r�tearDownszBinHexTestCase.tearDownsJack is my herocCsnt|jd�}|�|j�|��t�|j|j�t�|j|j�t|jd�}|��}|��|�	|j|�dS)N�wb�rb)
�openr�write�DATA�close�binhexrZhexbin�readlineZassertEqual)r	�fZfinishr
r
r�test_binhexs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)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
rcCst�t�dS)N)rZrun_unittestrr
r
r
r�	test_main2sr�__main__)	�__doc__rZunittestZtestrZTestCaserrrr
r
r
r�<module>s'