#NEWLINE# def test_export_import_case_2( self ) : #NEWLINE# #INDENT# from tempfile import mkstemp #NEWLINE# import os #NEWLINE# gdb1 = Recognizer ( db = [ self . Ninvar , self . Tinvar ] ) #NEWLINE# gdb2 = Recognizer ( ) #NEWLINE# ( fh , fn ) = mkstemp ( ) #NEWLINE# os . close ( fh ) #NEWLINE# g = gdb1 . export_gesture ( name = 'N' , filename = fn ) #NEWLINE# gdb2 . import_gesture ( filename = fn ) #NEWLINE# os . unlink ( fh ) #NEWLINE# self . assertEqual ( len ( gdb1 . db ) , 2 ) #NEWLINE# self . assertEqual ( len ( gdb2 . db ) , 1 ) #NEWLINE# r = gdb2 . recognize ( [ Ncandidate ] , max_gpf = 0 ) #NEWLINE# self . assertEqual ( r . best [ 'name' ] , 'N' ) #NEWLINE# self . assertTrue ( ( ( r . best [ 'score' ] > 0.94 ) and ( r . best [ 'score' ] < 0.95 ) ) )