Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing failing test on Windows #493

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ontopy/factpluspluswrapper/owlapi_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ def reason(self, graph):
graph (Graph): An rdflib graph to execute the reasoner on.

"""
with tempfile.NamedTemporaryFile("wt") as tmpdir:
graph.serialize(tmpdir.name, format="xml")
return self._run(tmpdir.name, command="--run-reasoner")
with tempfile.TemporaryDirectory("wt") as tmpdir:
tmpfile = os.path.join(tmpdir, "tmponto.xml")
graph.serialize(tmpfile, format="xml")
return self._run(tmpfile, command="--run-reasoner")

def reason_files(self, *owl_files):
"""Merge the given owl and generate the inferred axioms.
Expand Down