Skip to content

Commit

Permalink
Add test case for RDFLib#939
Browse files Browse the repository at this point in the history
  • Loading branch information
mielvds committed Aug 31, 2023
1 parent e42b752 commit dde12f0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/test_conjunctivegraph/test_conjunctive_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import pytest

from io import StringIO

from rdflib import ConjunctiveGraph, Graph
from rdflib.namespace import NamespaceManager
from rdflib.parser import StringInputSource
Expand Down Expand Up @@ -77,3 +79,20 @@ def check(kws):
@pytest.mark.parametrize("checker, kws", get_graph_ids_tests())
def test_graph_ids(checker, kws):
checker(kws)

def test_parse_return_type():
g = ConjunctiveGraph()
g.parse(data=DATA, format='turtle')
assert type(g) is ConjunctiveGraph

g = ConjunctiveGraph()
g = g.parse(data=DATA, format='turtle')
assert type(g) is ConjunctiveGraph

g = ConjunctiveGraph()
g.parse(source=StringIO(DATA), format='turtle')
assert type(g) is ConjunctiveGraph

g = ConjunctiveGraph()
g = g.parse(source=StringIO(DATA), format='turtle')
assert type(g) is ConjunctiveGraph

0 comments on commit dde12f0

Please sign in to comment.