#NEWLINE# def test_even_extension( ) : #NEWLINE# #INDENT# res = list ( graph . query ( '\n    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n    PREFIX func:  <http://example.org/functions#>\n\n    SELECT ?value\n    WHERE { ?x rdf:value ?value . FILTER ( func:even(?value) ) }\n\n    ' ) ) #NEWLINE# res . sort ( ) #NEWLINE# expected = [ ( Literal ( 0 ) , ) , ( Literal ( 2 ) , ) ] #NEWLINE# assert ( res == expected ) , ( 'Expected %s but got %s' % ( expected , res ) )