#NEWLINE# def testPrepare( ) : #NEWLINE# #INDENT# q = prepareQuery ( 'SELECT ?target WHERE { }' ) #NEWLINE# r = list ( g . query ( q ) ) #NEWLINE# e = [ ] #NEWLINE# assert ( r == e ) , ( 'prepare: %r != %r' % ( r , e ) ) #NEWLINE# r = list ( g . query ( q , initBindings = { #NEWLINE# #INDENT# 'target' : Literal ( 'example' ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# e = [ ( Literal ( 'example' ) , ) ] #NEWLINE# assert ( r == e ) , ( 'prepare: %r != %r' % ( r , e ) ) #NEWLINE# r = list ( g . query ( q ) ) #NEWLINE# e = [ ] #NEWLINE# assert ( r == e ) , ( 'prepare: %r != %r' % ( r , e ) )