Skip to content

Commit

Permalink
Assert > if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reese committed Aug 21, 2024
1 parent 1d213c9 commit bca7a25
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_implementations/test_semsimian_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ def test_all_by_all_similarity_with_custom_ic_map(self):
sim = (adapter.all_by_all_pairwise_similarity(entities, entities, predicates=self.predicates))

for s in sim:
if s is not None:
if s.object_id == VACUOLE and s.subject_id == VACUOLE:
self.assertEqual(s.ancestor_information_content, 5.5)
if s.object_id == ENDOMEMBRANE_SYSTEM and s.subject_id == ENDOMEMBRANE_SYSTEM:
self.assertEqual(s.ancestor_information_content, 6.0)
if s.object_id == VACUOLE and s.subject_id == ENDOMEMBRANE_SYSTEM:
self.assertEqual(s.ancestor_information_content, 0)
self.assertIsNotNone(s)
if s.object_id == VACUOLE and s.subject_id == VACUOLE:
self.assertEqual(s.ancestor_information_content, 5.5)
if s.object_id == ENDOMEMBRANE_SYSTEM and s.subject_id == ENDOMEMBRANE_SYSTEM:
self.assertEqual(s.ancestor_information_content, 6.0)
if s.object_id == VACUOLE and s.subject_id == ENDOMEMBRANE_SYSTEM:
self.assertEqual(s.ancestor_information_content, 0)
else:
raise ValueError(f"Did not get similarity for got {s.object_id} and {s.subject_id}")

Expand Down

0 comments on commit bca7a25

Please sign in to comment.