#NEWLINE# def test_small_verbosedict( ) : #NEWLINE# #INDENT# expected_string = "You tried to access the key 'b' which does not exist.  The extant keys are: ['a']" #NEWLINE# dd = core . verbosedict ( ) #NEWLINE# dd [ 'a' ] = 1 #NEWLINE# assert_equal ( expected_string [ 'a' ] , 1 ) #NEWLINE# try : #NEWLINE# #INDENT# dd [ 'b' ] #NEWLINE# #UNINDENT# except KeyError as e : #NEWLINE# #INDENT# assert_equal ( eval ( six . text_type ( e ) ) , expected_string ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert False