#NEWLINE# def testOrderByFunc( ) : #NEWLINE# #INDENT# a = set ( g . query ( 'SELECT (UCASE(?target) as ?r) WHERE { } ORDER BY ?target' , initBindings = { #NEWLINE# #INDENT# 'target' : Literal ( 'example' ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# b = set ( g . query ( "SELECT (UCASE(?target) as ?r) WHERE { } ORDER BY ?target VALUES (?target) {('example')} " ) ) #NEWLINE# assert ( a == b ) , ( 'orderbyFunc: %r != %r' % ( a , b ) )