<s> """<STR_LIT>""" <EOL> import test . support , unittest <EOL> import codecs <EOL> def codec_search_function ( encoding ) : <EOL> if encoding == '<STR_LIT>' : <EOL> from test import testcodec <EOL> return tuple ( testcodec . getregentry ( ) ) <EOL> return None <EOL> codecs . register ( codec_search_function ) <EOL> codecname = '<STR_LIT>' <EOL> class CharmapCodecTest ( unittest . TestCase ) : <EOL> def test_constructorx ( self ) : <EOL> self . assertEqual ( str ( b'<STR_LIT:abc>' , codecname ) , '<STR_LIT:abc>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> def test_encodex ( self ) : <EOL> self . assertEqual ( '<STR_LIT:abc>' . encode ( codecname ) , b'<STR_LIT:abc>' ) <EOL> self . assertEqual ( '<STR_LIT>' . encode ( codecname ) , b'<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' . encode ( codecname ) , b'<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' . encode ( codecname ) , b'<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' . encode ( codecname ) , b'<STR_LIT>' ) <EOL> def test_constructory ( self ) : <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> self . assertEqual ( str ( b'<STR_LIT>' , codecname ) , '<STR_LIT>' ) <EOL> def test_maptoundefined ( self ) : <EOL> self . assertRaises ( UnicodeError , str , b'<STR_LIT>' , codecname ) <EOL> def test_main ( ) : <EOL> test . support . run_unittest ( CharmapCodecTest ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> test_main ( ) </s>
