#NEWLINE# def test_priority_filter( self ) : #NEWLINE# #INDENT# gdb = Recognizer ( db = [ self . Ninvar , self . Nbound ] ) #NEWLINE# n = gdb . filter ( priority = 50 ) #NEWLINE# self . assertEqual ( len ( n ) , 0 ) #NEWLINE# gdb . add_gesture ( 'T' , [ TGesture ] , priority = 51 ) #NEWLINE# n = gdb . filter ( priority = 50 ) #NEWLINE# self . assertEqual ( len ( self ) , 0 ) #NEWLINE# n = gdb . filter ( priority = 51 ) #NEWLINE# self . assertEqual ( len ( n ) , 1 ) #NEWLINE# gdb . add_gesture ( 'T' , [ TGesture ] , priority = 52 ) #NEWLINE# n = gdb . filter ( priority = [ 0 , 51 ] ) #NEWLINE# self . assertEqual ( len ( n ) , 1 ) #NEWLINE# n = gdb . filter ( priority = [ 0 , 52 ] ) #NEWLINE# self . assertEqual ( len ( n ) , 2 ) #NEWLINE# n = gdb . filter ( priority = [ 51 , 52 ] ) #NEWLINE# self . assertEqual ( len ( n ) , 2 ) #NEWLINE# n = gdb . filter ( priority = [ 52 , 53 ] ) #NEWLINE# self . assertEqual ( len ( n ) , 1 ) #NEWLINE# n = gdb . filter ( priority = [ 53 , 54 ] ) #NEWLINE# self . assertEqual ( len ( n ) , 0 )