Skip to content

Commit d173c00

Browse files
committed
check whole result
1 parent d7b59bc commit d173c00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_sparql/test_agg_distinct.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from rdflib import Graph, URIRef
2+
from rdflib.term import Literal
23

34
query_tpl = """
45
SELECT ?x (MIN(?y_) as ?y) (%s(DISTINCT ?z_) as ?z) {
@@ -147,4 +148,8 @@ def test_count_optional_values():
147148
} GROUP BY ?x
148149
"""
149150
results = dict(g.query(query))
150-
assert results[URIRef("http://example.com/3")].toPython() == 0
151+
assert results == {
152+
URIRef("http://example.com/1"): Literal(1),
153+
URIRef("http://example.com/2"): Literal(2),
154+
URIRef("http://example.com/3"): Literal(0),
155+
}

0 commit comments

Comments
 (0)