Skip to content

Commit

Permalink
Added test for content of generated file as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-friis committed May 9, 2024
1 parent 1a4771e commit ba7e997
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/tools/test_ontodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ def test_ontodoc_rst() -> None:
"""Test reStructuredText output with ontodoc."""
from ontopy.testutils import ontodir, outdir, get_tool_module

test_file = ontodir / "mammal.ttl"
ontodoc = get_tool_module("ontodoc")

ontodoc.main(
[
"--imported",
"--reasoner=HermiT",
"--iri-regex=^https://w3id.org/emmo/domain",
str(test_file),
str(ontodir / "mammal.ttl"),
str(outdir / "mammal.rst"),
]
)
rstfile = outdir / "mammal.rst"
assert rstfile.exists()
content = rstfile.read_text()
assert "latinName" in content

0 comments on commit ba7e997

Please sign in to comment.