Skip to content

Commit 7919d9c

Browse files
committed
emoji test case added
1 parent 4650c4d commit 7919d9c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/knowledge_collection_tools_test.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ def test_literal_object_quad(self):
4242
assert quads[0] in grouped[0]
4343
assert quads[1] in grouped[0]
4444

45+
def test_literal_object_quad_with_an_emoticon(self):
46+
# JSON-LD equivalent of the quads being tested:
47+
#
48+
# {
49+
# "@context": "http://schema.org",
50+
# "@id": "http://example.org/book1",
51+
# "type": "Book",
52+
# "title": "The Great Book"
53+
# }
54+
quads = [
55+
'<http://example.org/book1> <http://schema.org/title> "The Great Book 😀" .',
56+
"<http://example.org/book1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Book> .",
57+
]
58+
grouped = kc_tools.group_nquads_by_subject(quads)
59+
assert len(grouped) == 1
60+
assert quads[0] in grouped[0]
61+
assert quads[1] in grouped[0]
62+
4563
def test_literal_with_escape_character(self):
4664
# JSON-LD equivalent of the quads being tested:
4765
#

0 commit comments

Comments
 (0)