def testToldBNode(self):
        for s,p,o in self.graph.triples((None,RDF.type,None)):
            pass
        query = """SELECT ?obj WHERE { %s ?prop ?obj }"""%s.n3()
        print query
        rt = self.graph.query(query,DEBUG=debug)
        print list(rt)
        self.failUnless(len(rt) == 1,"BGP should only match the 'told' BNode by name (result set size: %s)"%len(rt))
        bindings = {Variable('subj'):s}
        query = """SELECT ?obj WHERE { ?subj ?prop ?obj }"""
        print query
        rt = self.graph.query(query,initBindings=bindings,DEBUG=debug)
        self.failUnless(len(rt) == 1,(len(rt),s.n3())%"BGP should only match the 'told' BNode by name (result set size: %s, BNode: %s)")
dataset/ETHPy150Open RDFLib/rdfextras/test/test_sparql/test_sparql_told_bnodes.py/TestSPARQLToldBNodes.testToldBNode/swapped operands of `%`