view service/mqtt_to_rdf/lhs_evaluation_test.py @ 1666:4fd9fdfcf16a

clean up dead tests
author drewp@bigasterisk.com
date Mon, 20 Sep 2021 23:20:46 -0700
parents 449746d1598f
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