<s> import unittest <EOL> import ernie <EOL> def sstr ( str ) : <EOL> return str <EOL> class TestModLoader ( unittest . TestCase ) : <EOL> def testMod ( self ) : <EOL> ernie . Ernie . mods . clear ( ) <EOL> ernie . mod ( '<STR_LIT:test>' ) <EOL> self . failUnlessEqual ( ernie . Ernie . mods . keys ( ) , [ '<STR_LIT:test>' ] ) <EOL> self . failUnlessEqual ( ernie . mod ( '<STR_LIT:test>' ) . name , '<STR_LIT:test>' ) <EOL> def testModFun ( self ) : <EOL> ernie . mod ( '<STR_LIT:test>' ) . funs . clear ( ) <EOL> ernie . mod ( '<STR_LIT:test>' ) . fun ( '<STR_LIT>' , sstr ) <EOL> self . failUnlessEqual ( ernie . mod ( '<STR_LIT:test>' ) . funs . keys ( ) , [ '<STR_LIT>' ] ) <EOL> self . failUnlessEqual ( ernie . mod ( '<STR_LIT:test>' ) . funs [ '<STR_LIT>' ] , sstr ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
