File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import json
22import sys
3+ from typing import Any
34
45
56def main () -> None :
@@ -9,7 +10,7 @@ def main() -> None:
910 """
1011
1112 # Initialize the basic CASE graph that will have the files appended
12- case : dict = {
13+ case : dict [ str , Any ] = {
1314 "@context" : {
1415 "case-investigation" : "https://ontology.caseontology.org/case/investigation/" ,
1516 "kb" : "http://example.org/kb/" ,
Original file line number Diff line number Diff line change 33from typing import Set
44
55from rdflib import Graph , URIRef
6+ from rdflib .query import ResultRow
67
78
89class CASEOutputTests (unittest .TestCase ):
@@ -11,7 +12,7 @@ def test_graphs_exist(self) -> None:
1112 Identifies all CASE graph files within the ./output directory and ensures there
1213 are at least two.
1314 """
14- files : list = []
15+ files : list [ str ] = []
1516 source_directory : str = "./output"
1617 for file in os .listdir (source_directory ):
1718 if file .endswith (".json" ) or file .endswith (".jsonld" ):
@@ -68,6 +69,8 @@ def test_organization_iri_found(self) -> None:
6869 g : Graph = Graph ()
6970 g .parse (os .path .join (source_directory , file ))
7071 for result in g .query (query ):
72+ assert isinstance (result , ResultRow )
73+ assert isinstance (result [0 ], URIRef )
7174 # Graph.query for a SELECT query returns a tuple, with
7275 # member count as long as the number of bound variables.
7376 computed .add (result [0 ])
You can’t perform that action at this time.
0 commit comments