<s> import unittest <EOL> import Common <EOL> from common import Collections <EOL> class CollectionsTest ( unittest . TestCase ) : <EOL> def testDefaultDict ( self ) : <EOL> d = Collections . DefaultDict ( lambda : <NUM_LIT:1> ) <EOL> assert d [ "<STR_LIT:foo>" ] == <NUM_LIT:1> <EOL> d [ "<STR_LIT:foo>" ] = <NUM_LIT:2> <EOL> assert d [ "<STR_LIT:foo>" ] == <NUM_LIT:2> <EOL> def testDictProxy ( self ) : <EOL> d1 = { "<STR_LIT>" : "<STR_LIT>" } <EOL> d2 = Collections . DictProxy ( d1 ) <EOL> assert d2 . hip == "<STR_LIT>" <EOL> def testInverseDict ( self ) : <EOL> d1 = { "<STR_LIT>" : "<STR_LIT>" } <EOL> d2 = Collections . inverseDict ( d1 ) <EOL> assert d2 [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
