+16
-1
lines changedFilter options
+16
-1
lines changed Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ def get_target_namespace_elements(
106
106
for e in elements:
107
107
desc = e[1].replace("\n", " ")
108
108
elements_strs.append(
109
-
f" {e[0].replace(args.target_namespace, '')}: URIRef # {desc}\n"
109
+
f" {e[0].replace(target_namespace, '')}: URIRef # {desc}\n"
110
110
)
111
111
112
112
return elements, elements_strs
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@
2
2
import sys
3
3
from pathlib import Path
4
4
5
+
from rdflib.graph import Graph
6
+
from rdflib.tools.defined_namespace_creator import get_target_namespace_elements
7
+
5
8
6
9
def test_definednamespace_creator_qb():
7
10
"""
@@ -163,3 +166,15 @@ def test_definednamespace_creator_multiple_comments():
163
166
164
167
# cleanup
165
168
Path.unlink(Path("_MULTILINESTRINGEXAMPLE.py"))
169
+
170
+
171
+
def test_get_target_namespace_elements(rdfs_graph: Graph) -> None:
172
+
elements = get_target_namespace_elements(
173
+
rdfs_graph, "http://www.w3.org/2000/01/rdf-schema#"
174
+
)
175
+
assert 2 == len(elements)
176
+
assert 16 == len(elements[0])
177
+
assert (
178
+
"http://www.w3.org/2000/01/rdf-schema#Class",
179
+
"The class of classes.",
180
+
) in elements[0]
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4