Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzZ1 committed Dec 4, 2023
1 parent 67fd852 commit 57dda23
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions container_test/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,27 @@
from rdflib.compare import isomorphic


# def are_graphs_equal(graph1, graph2):
# isomorphic_result = isomorphic(graph1, graph2)

# return isomorphic_result


def are_graphs_equal(graph1, graph2):
isomorphic_result = isomorphic(graph1, graph2)
# Find triples in graph1 that are not in graph2
diff_graph1 = Graph()
for triple in graph1:
if triple not in graph2:
diff_graph1.add(triple)

# Find triples in graph2 that are not in graph1
diff_graph2 = Graph()
for triple in graph2:
if triple not in graph1:
print(triple)
diff_graph2.add(triple)

return isomorphic_result
return diff_graph1, diff_graph2


if __name__ == "__main__":
Expand Down

0 comments on commit 57dda23

Please sign in to comment.