Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_binhex.cpython-38.pyc
U

>��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@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__)rZTESTFN�fname1�fname2�fname3��self�r�//opt/cppython/lib/python3.8/test/test_binhex.py�setUp
szBinHexTestCase.setUpcCs(t�|j�t�|j�t�|j�dS�N)r�unlinkrrrr	rrr�tearDownszBinHexTestCase.tearDownsJack is my heroc	Csvt|jd��}|�|j�W5QRXt�|j|j�t�|j|j�t|jd��}|��}W5QRX|�|j|�dS)N�wb�rb)	�openr�write�DATA�binhexrZhexbin�readlineZassertEqual)r
�fZfinishrrr�test_binhexszBinHexTestCase.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)r
Zf3rrr�"test_binhex_error_on_long_filename&sz1BinHexTestCase.test_binhex_error_on_long_filenamec	Csdt|jd��}|�|j�W5QRXt�|j|j�t|jd��}|��}W5QRX|�d|�dS)Nrr�
)rrrrrr�readZassertNotIn)r
r�fp�contentsrrr�test_binhex_line_endings0sz'BinHexTestCase.test_binhex_line_endingsN)	�__name__�
__module__�__qualname__r
rrrrr!rrrrrs

rcCst�t�dSr)rZrun_unittestrrrrr�	test_main<sr%�__main__)	�__doc__rZunittest�testrZTestCaserr%r"rrrr�<module>s1

F1le Man4ger