def test_bnode_publicid():
g = ConjunctiveGraph()
b = BNode()
data = '<d:d> <e:e> <f:f> .'
print ("Parsing %r into %r"%(data, b))
g.parse(data=data, format='turtle', publicID=b)
triples = list( g.get_context(b).triples((None,None,None)) )
if not triples:
raise Exception("No triples found in graph %r"%b)
u = URIRef(b)
triples = list( g.get_context(u).triples((None,None,None)) )
if triples:
raise Exception("Bad: Found in graph %r: %r"%(u, triples))
test_conjunctive_graph.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录