summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Hees <dev@joernhees.de>2016-02-16 12:41:22 +0100
committerJoern Hees <dev@joernhees.de>2016-02-16 12:41:22 +0100
commit723f45f29075fce0efccaa9bc8c4cf5c3f5c4b68 (patch)
treef06ca5c88584529aa32a30cd6640ce32b1dc9c1a
parent39cb1bc40bcb13327eae089659bdda1715818add (diff)
downloadrdflib-723f45f29075fce0efccaa9bc8c4cf5c3f5c4b68.tar.gz
minimal test for #446
-rw-r--r--test/test_issue446.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_issue446.py b/test/test_issue446.py
new file mode 100644
index 00000000..bc414baf
--- /dev/null
+++ b/test/test_issue446.py
@@ -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()