#NEWLINE# def test_searcher_lmdb( ) : #NEWLINE# #INDENT# import shutil #NEWLINE# data = pkl . load ( open ( relpath ( './testdata/test_searcher_data.pkl' ) ) ) #NEWLINE# m = LOPQModel . load_proto ( relpath ( './testdata/random_test_model.lopq' ) ) #NEWLINE# lmbd_test_path = './test_lopq_lmbd' #NEWLINE# q = np . ones ( 8 ) #NEWLINE# searcher = LOPQSearcherLMDB ( m , lmbd_test_path ) #NEWLINE# searcher . add_data ( data ) #NEWLINE# searcher_instance_battery ( searcher , q ) #NEWLINE# shutil . rmtree ( lmbd_test_path ) #NEWLINE# searcher = LOPQSearcherLMDB ( m , lmbd_test_path ) #NEWLINE# codes = [ m . predict ( x ) for x in data ] #NEWLINE# searcher . add_codes ( codes ) #NEWLINE# searcher_instance_battery ( searcher , q ) #NEWLINE# shutil . rmtree ( lmbd_test_path )