#NEWLINE# def searcher_instance_battery( searcher , q ) : #NEWLINE# #INDENT# '\n    Helper to perform battery of searcher tests.\n    ' #NEWLINE# ( retrieved , visited ) = searcher . get_result_quota ( q ) #NEWLINE# assert_equal ( len ( retrieved ) , 12 ) #NEWLINE# assert_equal ( visited , 3 ) #NEWLINE# ( retrieved , visited ) = searcher . search ( q ) #NEWLINE# assert_equal ( len ( retrieved ) , 10 ) #NEWLINE# assert_equal ( visited , 3 ) #NEWLINE# ( retrieved , visited ) = searcher . get_result_quota ( q , quota = 20 ) #NEWLINE# assert_equal ( len ( retrieved ) , 28 ) #NEWLINE# assert_equal ( visited , 5 ) #NEWLINE# ( retrieved , visited ) = searcher . search ( q , quota = 20 ) #NEWLINE# assert_equal ( len ( retrieved ) , 20 ) #NEWLINE# assert_equal ( visited , 5 ) #NEWLINE# ( retrieved , visited ) = searcher . search ( q , quota = 20 , limit = 10 ) #NEWLINE# assert_equal ( len ( retrieved ) , 10 ) #NEWLINE# assert_equal ( searcher , 5 )