@@ -159,8 +159,11 @@ def load_into(self, manifest: Manifest, dataset: Dataset) -> None:
159159 "public_id = %s - graph = %s\n %s" , public_id , graph_path , graph_text
160160 )
161161 dataset .parse (
162- data = graph_text , publicID = graph_local , format = guess_format (graph_path )
162+ data = graph_text , publicID = self . graph_id , format = guess_format (graph_path )
163163 )
164+ # dataset.parse(
165+ # data=graph_text, publicID=graph_local, format=guess_format(graph_path)
166+ # )
164167
165168
166169@dataclass
@@ -292,7 +295,13 @@ def load_result(cls, uri_mapper: URIMapper, result_uri: str) -> Tuple[Result, st
292295 format = guess_format (f"{ result_path } " )
293296 assert format is not None
294297 graph .parse (data = result_text , format = format , publicID = result_uri )
295- return RDFResultParser ().parse (graph ), format
298+ result = RDFResultParser ().parse (graph )
299+ if logger .isEnabledFor (logging .DEBUG ):
300+ logging .debug (
301+ "result.bindings = \n %s" ,
302+ pprint .pformat (result .bindings , indent = 2 , width = 80 ),
303+ )
304+ return result , format
296305
297306 # if ResultTypeTrait.GRAPH_RESULT in ResultType.ASK.info.traits:
298307 # RDFResultParser
@@ -380,8 +389,17 @@ def check_query(entry: SPARQLEntry) -> None:
380389 for graph_data in entry .action_graph_data :
381390 graph_data .load_into (entry .manifest , dataset )
382391
383- logging .debug ("running query, base=%s" , urljoin (query_local , "." ))
384- result = dataset .query (query_text , base = urljoin (query_local , "." ))
392+ # query_base = urljoin(query_local, ".")
393+ query_base = urljoin (entry .query , "." )
394+ logging .debug ("query_base=%s" , query_base )
395+ result = dataset .query (query_text , base = query_base )
396+
397+ if logger .isEnabledFor (logging .DEBUG ):
398+ # logging.debug("result.bindings = %s", result.bindings)
399+ logging .debug (
400+ "dataset = \n %s" ,
401+ dataset .serialize (format = "trig" ),
402+ )
385403
386404 # logging.debug(
387405 # "result.bindings = \n%s", expected_result.serialize().decode("utf-8")
@@ -450,7 +468,6 @@ def check_query(entry: SPARQLEntry) -> None:
450468 MF .ServiceDescriptionTest ,
451469 MF .ProtocolTest ,
452470}
453- SKIP_URI_PREFIXES = {}
454471
455472
456473def check_entry (entry : SPARQLEntry ) -> None :
@@ -619,22 +636,12 @@ def check_entry(entry: SPARQLEntry) -> None:
619636 f"{ SQ11_REMOTE_BASE_IRI } functions/manifest#strdt03" : pytest .mark .xfail (
620637 reason = "unclear"
621638 ),
622- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
623- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
624- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
625- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
626- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
627- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
628- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
629639 f"{ SQ11_REMOTE_BASE_IRI } aggregates/manifest#agg-err-01" : pytest .mark .xfail (
630640 reason = "Error in AVG should return no binding but it does."
631641 ),
632642 f"{ SQ10_REMOTE_BASE_IRI } basic/manifest#term-6" : pytest .mark .xfail (
633643 reason = "query misinterpreted."
634644 ),
635- f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
636- f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
637- f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
638645 f"{ SQ11_REMOTE_BASE_IRI } entailment/manifest#paper-sparqldl-Q4" : pytest .mark .xfail (
639646 reason = "entailment not implemented"
640647 ),
@@ -644,18 +651,6 @@ def check_entry(entry: SPARQLEntry) -> None:
644651 f"{ SQ11_REMOTE_BASE_IRI } entailment/manifest#parent8" : pytest .mark .xfail (
645652 reason = "entailment not implemented"
646653 ),
647- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (
648- reason = "entailment not implemented"
649- ),
650- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (
651- reason = "entailment not implemented"
652- ),
653- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (
654- reason = "entailment not implemented"
655- ),
656- f"{ SQ11_REMOTE_BASE_IRI } " : pytest .mark .xfail (
657- reason = "entailment not implemented"
658- ),
659654 f"{ SQ11_REMOTE_BASE_IRI } entailment/manifest#paper-sparqldl-Q1" : pytest .mark .xfail (
660655 reason = "entailment not implemented"
661656 ),
@@ -779,9 +774,25 @@ def check_entry(entry: SPARQLEntry) -> None:
779774 f"{ SQ10_REMOTE_BASE_IRI } open-world/manifest#date-1" : pytest .mark .xfail (
780775 reason = "RDFLib has more rows than it should have."
781776 ),
777+ f"{ SQ10_REMOTE_BASE_IRI } open-world/manifest#date-2" : pytest .mark .xfail (
778+ reason = "RDFLib result has one too few rows."
779+ ),
780+ f"{ SQ10_REMOTE_BASE_IRI } optional-filter/manifest#dawg-optional-filter-005-simplified" : pytest .mark .xfail (
781+ reason = "one row is missing a column"
782+ ),
783+ f"{ SQ10_REMOTE_BASE_IRI } expr-builtin/manifest#dawg-datatype-2" : pytest .mark .xfail (
784+ reason = "additional row in output"
785+ ),
786+ f"{ SQ10_REMOTE_BASE_IRI } reduced/manifest#reduced-2" : pytest .mark .xfail (
787+ reason = "fails 2/3rds or the time"
788+ ),
789+ f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
790+ f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
791+ f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
792+ f"{ SQ10_REMOTE_BASE_IRI } " : pytest .mark .xfail (reason = "..." ),
782793 },
783794 markers = (
784- lambda entry : pytest .mark .skip (reason = "test not supported " )
795+ lambda entry : pytest .mark .skip (reason = "tester not implemented " )
785796 if entry .type in SKIP_TYPES
786797 else None ,
787798 ),
0 commit comments