Mercurial > code > home > repos > homeauto
view service/mqtt_to_rdf/lhs_evaluation_test.py @ 1695:5c2565e63297
take out some misduided fixes
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 22:55:32 -0700 |
parents | 4fd9fdfcf16a |
children |
line wrap: on
line source
import unittest from rdflib import RDF, ConjunctiveGraph, Literal, Namespace from rdflib.parser import StringInputSource EX = Namespace('http://example.com/') def N3(txt: str): g = ConjunctiveGraph() prefix = """ @prefix : <http://example.com/> . """ g.parse(StringInputSource((prefix + txt).encode('utf8')), format='n3') return g