diff options
Diffstat (limited to 'test/test_issue715.py')
-rw-r--r-- | test/test_issue715.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test_issue715.py b/test/test_issue715.py index 121e05fd..a2e21169 100644 --- a/test/test_issue715.py +++ b/test/test_issue715.py @@ -11,19 +11,18 @@ from rdflib import URIRef, Graph def test_issue_715(): g = Graph() a, b, x, y, z = [URIRef(s) for s in "abxyz"] - isa = URIRef('isa') + isa = URIRef("isa") g.add((a, isa, x)) g.add((a, isa, y)) g.add((b, isa, x)) - l1 = list(g.query('SELECT ?child ?parent WHERE {?child <isa> ?parent .}')) - l2 = list(g.query('SELECT ?child ?parent WHERE {?child <isa>+ ?parent .}')) + l1 = list(g.query("SELECT ?child ?parent WHERE {?child <isa> ?parent .}")) + l2 = list(g.query("SELECT ?child ?parent WHERE {?child <isa>+ ?parent .}")) assert len(l1) == len(l2) assert set(l1) == set(l2) - l3 = list(g.query('SELECT ?child ?parent WHERE {?child <isa>* ?parent .}')) + l3 = list(g.query("SELECT ?child ?parent WHERE {?child <isa>* ?parent .}")) assert len(l3) == 7 - assert set(l3) == set(l1).union({(URIRef(n), URIRef(n)) for - n in (a, b, x, y)}) + assert set(l3) == set(l1).union({(URIRef(n), URIRef(n)) for n in (a, b, x, y)}) g.add((y, isa, z)) - l4 = list(g.query('SELECT ?child ?parent WHERE {?child <isa>* ?parent .}')) + l4 = list(g.query("SELECT ?child ?parent WHERE {?child <isa>* ?parent .}")) assert len(l4) == 10 assert (a, z) in l4 |