Skip to content

Commit

Permalink
Remove debug commands
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 26, 2024
1 parent cffbf09 commit 38c49a5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ckanext/dcat/tests/test_shacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def test_validate_dcat_ap_2_graph_shapes_range():

graph = graph_from_dataset("ckan_full_dataset_dcat_ap_2_vocabularies.json")

graph.serialize(destination="graph_v2_range.ttl")
# dcat-ap_2.1.1_shacl_range.ttl: constraints concerning object range
path = _get_shacl_file_path("dcat-ap_2.1.1_shacl_range.ttl")
r = validate(graph, shacl_graph=path)
Expand Down Expand Up @@ -174,18 +173,14 @@ def test_validate_dcat_ap_2_graph_shapes_range():
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_3"
)
@pytest.mark.ckan_config("ckanext.dcat.rdf.profiles", "euro_dcat_ap_3")
def test_validate_dcat_ap_3_graph():

graph = graph_from_dataset("ckan_full_dataset_dcat_ap_2_vocabularies.json")
graph.serialize(destination="graph.ttl")

path = _get_shacl_file_path("dcat-ap_3_shacl_shapes.ttl")
r = validate(graph, shacl_graph=path)
conforms, results_graph, results_text = r
with open("shacl_results.txt", "w") as f:
f.write(results_text)

failures = [
str(t[2])
Expand All @@ -203,5 +198,4 @@ def test_validate_dcat_ap_3_graph():
"Value does not have class dcat:Dataset",
]


assert set(failures) - set(known_failures) == set(), results_text

0 comments on commit 38c49a5

Please sign in to comment.