#NEWLINE# def test_search_globbing( ) : #NEWLINE# #INDENT# dict = { #NEWLINE# #INDENT# 'a' : { #NEWLINE# #INDENT# 'b' : { #NEWLINE# #INDENT# 'c' : { #NEWLINE# #INDENT# 'd' : 0 , #NEWLINE# 'e' : 1 , #NEWLINE# 'f' : 2 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# paths = [ 'a/b/c/d' , 'a/b/c/f' ] #NEWLINE# for ( path , value ) in dpath . util . search ( dict , '/a/**/[df]' , yielded = True ) : #NEWLINE# #INDENT# assert ( path in paths ) #NEWLINE# #UNINDENT# for ( path , value ) in dpath . util . search ( dict , [ 'a' , '**' , '[df]' ] , yielded = True ) : #NEWLINE# #INDENT# assert ( path in dict )