<s> import unittest <EOL> class TestBaseEncoding ( unittest . TestCase ) : <EOL> def test_encode ( self ) : <EOL> from velruse . app . baseconvert import base_encode <EOL> self . assertEqual ( base_encode ( <NUM_LIT> ) , '<STR_LIT:L>' ) <EOL> self . assertEqual ( base_encode ( <NUM_LIT> ) , '<STR_LIT>' ) <EOL> self . assertEqual ( base_encode ( <NUM_LIT:0> ) , '<STR_LIT:2>' ) <EOL> def test_bad_encode ( self ) : <EOL> from velruse . app . baseconvert import base_encode <EOL> self . assertRaises ( TypeError , base_encode , '<STR_LIT>' ) <EOL> def test_decode ( self ) : <EOL> from velruse . app . baseconvert import base_decode <EOL> self . assertEqual ( base_decode ( '<STR_LIT:L>' ) , <NUM_LIT> ) <EOL> self . assertEqual ( base_decode ( '<STR_LIT>' ) , <NUM_LIT> ) <EOL> self . assertEqual ( base_decode ( '<STR_LIT:2>' ) , <NUM_LIT:0> ) <EOL> def test_bad_decode ( self ) : <EOL> from velruse . app . baseconvert import base_decode <EOL> self . assertRaises ( ValueError , base_decode , '<STR_LIT>' ) </s>
