diff --git a/ldtest/sparql/tests.sparql b/ldtest/sparql/tests.sparql index 47ee2f7..92e11b7 100644 --- a/ldtest/sparql/tests.sparql +++ b/ldtest/sparql/tests.sparql @@ -16,4 +16,8 @@ SELECT ?test ?result ?input ?req ?extract_all_scripts WHERE { FILTER NOT EXISTS { ?test jld:option / jld:specVersion "json-ld-1.0"^^xsd:string . } + + FILTER NOT EXISTS { + ?test jld:option / jld:processingMode "json-ld-1.0"^^xsd:string . + } } diff --git a/tests/errors.py b/tests/errors.py index fc2563c..c7a8cfe 100644 --- a/tests/errors.py +++ b/tests/errors.py @@ -3,6 +3,7 @@ from documented import Documented +from ldtest.models import TestCase from yaml_ld.models import Document @@ -12,10 +13,15 @@ class FailureToFail(Documented): YAMLLDError not raised. Expected error code: {self.expected_error_code} - Raw input document: {self.formatted_raw_document} - Expanded document: {self.formatted_expanded_document} + + Raw input document (from {self.test_case.input}): + {self.formatted_raw_document} + + Expanded document: + {self.formatted_expanded_document} """ + test_case: TestCase expected_error_code: str raw_document: bytes expanded_document: Document @@ -23,7 +29,7 @@ class FailureToFail(Documented): @property def formatted_raw_document(self) -> str: """Present the raw document.""" - return str(self.raw_document) + return self.raw_document.decode() @property def formatted_expanded_document(self) -> str: diff --git a/tests/test_specification.py b/tests/test_specification.py index 8eef65c..6dbdeec 100644 --- a/tests/test_specification.py +++ b/tests/test_specification.py @@ -49,6 +49,7 @@ def test_to_rdf(test_case: TestCase): else: pytest.fail(str(FailureToFail( + test_case=test_case, expected_error_code=test_case.result, raw_document=test_case.raw_document, expanded_document=rdf_document, @@ -76,6 +77,7 @@ def test_expand(test_case: TestCase): assert error.code == test_case.result else: pytest.fail(str(FailureToFail( + test_case=test_case, expected_error_code=test_case.result, raw_document=test_case.raw_document, expanded_document=expanded_document,