Skip to content

Commit

Permalink
Change asserts to address deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Aug 30, 2023
1 parent fc61f8c commit a7b51c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_templatemodel_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def test_equal_no_context(self):
edge_count,
f"len(edges)={len(tmd.comparison_graph.edges)}",
)
self.assert_(
self.assertTrue(
all("is_refinement" != d["label"] for _, _, d in tmd.comparison_graph.edges(data=True))
)
self.assert_(
self.assertTrue(
all(
d["label"] in ["is_equal"] + concept_edge_labels
for _, _, d in tmd.comparison_graph.edges(data=True)
Expand All @@ -111,13 +111,13 @@ def test_equal_context(self):
edge_count,
f"len(edges)={len(tmd_context.comparison_graph.edges)}",
)
self.assert_(
self.assertTrue(
all(
"is_refinement" != d["label"]
for _, _, d in tmd_context.comparison_graph.edges(data=True)
)
)
self.assert_(
self.assertTrue(
all(
d["label"] in ["is_equal"] + concept_edge_labels for _, _,
d in tmd_context.comparison_graph.edges(data=True)
Expand Down Expand Up @@ -148,24 +148,24 @@ def test_refinement(self):
tmd_vs_boston = TemplateModelDelta(self.sir, self.sir_boston, is_ontological_child_web)
tmd_vs_nyc = TemplateModelDelta(self.sir, self.sir_nyc, is_ontological_child_web)

self.assert_(
self.assertTrue(
all(
d["label"] in ["refinement_of"] + concept_edge_labels
for _, _, d in tmd_vs_boston.comparison_graph.edges(data=True)
)
)
self.assert_(
self.assertTrue(
all(
"is_equal" != d["label"]
for _, _, d in tmd_vs_boston.comparison_graph.edges(data=True)
)
)
self.assert_(
self.assertTrue(
all(
d["label"] in ["refinement_of"] + concept_edge_labels
for _, _, d in tmd_vs_nyc.comparison_graph.edges(data=True)
)
)
self.assert_(
self.assertTrue(
all("is_equal" != d["label"] for _, _, d in tmd_vs_nyc.comparison_graph.edges(data=True))
)

0 comments on commit a7b51c0

Please sign in to comment.