Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
553 B
20 lines
553 B
import unittest
|
|
import io
|
|
|
|
from pyoxigraph import *
|
|
|
|
|
|
class TestParse(unittest.TestCase):
|
|
def test_parse(self):
|
|
input = io.BytesIO(b'<foo> <p> "1" .')
|
|
result = list(parse(input, "text/turtle", base_iri="http://example.com/"))
|
|
|
|
assert result == [
|
|
Triple(
|
|
NamedNode("http://example.com/foo"),
|
|
NamedNode("http://example.com/p"),
|
|
Literal(
|
|
"1", datatype=NamedNode("http://www.w3.org/2001/XMLSchema#string")
|
|
),
|
|
)
|
|
]
|
|
|