Skip to content

Commit

Permalink
minimal test for #446
Browse files Browse the repository at this point in the history
  • Loading branch information
joernhees committed Feb 16, 2016
1 parent 39cb1bc commit 723f45f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test_issue446.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# coding=utf-8
# test for https://github.com/RDFLib/rdflib/issues/446

from rdflib import Graph, URIRef, Literal

def test_sparql_unicode():
g = Graph()
trip = (
URIRef('http://example.org/foo'),
URIRef('http://example.org/bar'),
URIRef(u'http://example.org/jörn')
)
g.add(trip)
q = 'select ?s ?p ?o where { ?s ?p ?o . FILTER(lang(?o) = "") }'
r = list(g.query(q))
assert r == [], \
'sparql query %r should return nothing but returns %r' % (q, r)


if __name__ == '__main__':
test_sparql_unicode()

0 comments on commit 723f45f

Please sign in to comment.