File: test_issue554.py

package info (click to toggle)
rdflib 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,248 kB
  • sloc: python: 39,216; sh: 153; makefile: 110
file content (14 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# test for https://github.com/RDFLib/rdflib/issues/554

import rdflib


def test_sparql_empty_no_row():
    g = rdflib.Graph()
    q = "select ?whatever { }"
    r = list(g.query(q))
    assert r == [], "sparql query %s should return empty list but returns %s" % (q, r)


if __name__ == "__main__":
    test_sparql_empty_no_row()