test_ontology.py 343 B

12345678910111213
  1. from pathlib import Path
  2. from rdflib import Graph
  3. def test_all_turtle_resources_parse():
  4. ontology = Path(__file__).parents[1] / "ontology"
  5. files = sorted(ontology.rglob("*.ttl"))
  6. assert len(files) == 8
  7. for path in files:
  8. graph = Graph()
  9. graph.parse(path, format="turtle")
  10. assert len(graph) > 0, path