#NEWLINE# def test_count( self ) : #NEWLINE# #INDENT# query = '\n        OutDegree(src, count(dst)) :- Edge(src, dst)\n        ' #NEWLINE# counter = collections . Counter ( ) #NEWLINE# for ( src , _ ) in self . edge_table . elements ( ) : #NEWLINE# #INDENT# counter [ src ] += 1 #NEWLINE# #UNINDENT# ex = [ ( src , cnt ) for ( src , cnt ) in counter . iteritems ( ) ] #NEWLINE# expected = collections . Counter ( self ) #NEWLINE# self . check_result ( query , expected , output = 'OutDegree' )