Your IP : 216.73.216.213
�
��f� c @ sy d Z d d l Z d d l Z d d l Z d d l m Z Gd d � d e j � Z d d � Z e d k ru e � n d S( u� Test script for the binhex C module
Uses the mechanism of the python binhex module
Based on an original test by Roger E. Masse.
i N( u supportc B sJ | Ee Z d Z d d � Z d d � Z d Z d d � Z d d � Z d
S( u BinHexTestCasec C s4 t j d | _ t j d | _ t j d | _ d S( Nu 1u 2uP very_long_filename__very_long_filename__very_long_filename__very_long_filename__( u supportu TESTFNu fname1u fname2u fname3( u self( ( u5 /opt/alt/python33/lib64/python3.3/test/test_binhex.pyu setUp s u BinHexTestCase.setUpc C s4 t j | j � t j | j � t j | j � d S( N( u supportu unlinku fname1u fname2u fname3( u self( ( u5 /opt/alt/python33/lib64/python3.3/test/test_binhex.pyu tearDown s u BinHexTestCase.tearDowns Jack is my heroc C s� t | j d � } | j | j � | j � t j | j | j � t j | j | j � t | j d � } | j � } | j � | j | j | � d S( Nu wbu rb(
u openu fname1u writeu DATAu closeu binhexu fname2u hexbinu readlineu assertEqual( u selfu fu finish( ( u5 /opt/alt/python33/lib64/python3.3/test/test_binhex.pyu test_binhex s
u BinHexTestCase.test_binhexc C sB t | j d � } | j � | j t j t j | j | j � d S( u�
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.
u wbN( u openu fname3u closeu assertRaisesu binhexu Erroru fname2( u selfu f3( ( u5 /opt/alt/python33/lib64/python3.3/test/test_binhex.pyu"