test_issue_git_336.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:Meiji 作者: GiovanniBalestrieri 项目源码 文件源码
def test_ns_localname_roundtrip():

    XNS = rdflib.Namespace('http://example.net/fs')

    g = rdflib.Graph()
    g.bind('xns', str(XNS))
    g.add((
        rdflib.URIRef('http://example.com/thingy'),
        XNS['lowecase.xxx-xxx_xxx'],  # <- not round trippable
        rdflib.Literal("Junk")))
    turtledump = g.serialize(format="turtle").decode('utf-8')
    xmldump = g.serialize().decode('utf-8')
    g1 = rdflib.Graph()

    g1.parse(data=xmldump)

    g1.parse(data=turtledump, format="turtle")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号