<s> import random , unittest , collections <EOL> from treedict import TreeDict , getTree <EOL> import treedict <EOL> from copy import deepcopy , copy <EOL> from hashlib import md5 <EOL> import random <EOL> from common import * <EOL> class TestRegressions ( unittest . TestCase ) : <EOL> def testFromdict_with_get_01 ( self ) : <EOL> t = TreeDict . fromdict ( { '<STR_LIT:a>' : <NUM_LIT:1> , '<STR_LIT:b>' : <NUM_LIT:2> } ) <EOL> self . assert_ ( t . get ( "<STR_LIT:c>" , [ ] ) == [ ] ) <EOL> def testFromdict_with_get_01_control ( self ) : <EOL> t = makeTDInstance ( ) <EOL> t . update ( { '<STR_LIT:a>' : <NUM_LIT:1> , '<STR_LIT:b>' : <NUM_LIT:2> } ) <EOL> self . assert_ ( t . get ( "<STR_LIT:c>" , [ ] ) == [ ] ) <EOL> def testFromdict_with_get_02 ( self ) : <EOL> t1 = TreeDict . fromdict ( { '<STR_LIT:a>' : <NUM_LIT:1> , '<STR_LIT:b>' : <NUM_LIT:2> } ) <EOL> t2 = makeTDInstance ( ) <EOL> t2 . update ( { '<STR_LIT:a>' : <NUM_LIT:1> , '<STR_LIT:b>' : <NUM_LIT:2> } ) <EOL> self . assert_ ( t1 == t2 ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
