Skip to content

Commit 04def9b

Browse files
committed
created kc-tools unit tests
1 parent 8ae055d commit 04def9b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/.gitkeep

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import dkg.utils.knowledge_collection_tools as kc_tools
2+
3+
4+
class TestGroupNQuadsBySubject:
5+
def test_resource_object_quad(self):
6+
quads = [
7+
"<http://example.org/book1> <http://schema.org/author> <http://example.org/author1> .",
8+
"<http://example.org/book1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Book> .",
9+
]
10+
grouped = kc_tools.group_nquads_by_subject(quads)
11+
assert len(grouped) == 1
12+
assert quads[0] in grouped[0]
13+
assert quads[1] in grouped[0]

0 commit comments

Comments
 (0)