Your IP : 216.73.216.85


Current Path : /opt/alt/python37/lib64/python3.7/test/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/test/__pycache__/test_binhex.cpython-37.opt-1.pyc

B

� f��@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
�5/opt/alt/python37/lib64/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'