Skip to content

Commit

Permalink
tests for equal does not always work with random mutations -> lessEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Nov 18, 2024
1 parent 26d6f8b commit 3b409f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_computeLRF.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ def test_computeLRF1(self):
# introduce 3 random edits and compute the distance
t2 = mutateLabeledTree(self.t1, 3)
res = computeLRF(self.t1,t2)
self.assertEqual(res,3)
self.assertLessEqual(res,3)

# introduce 5 random edits and compute the distance
t2 = mutateLabeledTree(self.t1, 5)
res = computeLRF(self.t1,t2)
self.assertEqual(res,5)
self.assertLessEqual(res,5)

def test_computeLRF2(self):
# randomise the labels and compute the distance
t3 = randomLabels(self.t1)
t4 = mutateLabeledTree(t3, 5)
res = computeLRF(t3,t4)
self.assertEqual(res,5)
self.assertLessEqual(res,5)


class ErrorTests(unittest.TestCase):
Expand All @@ -47,5 +47,6 @@ def test_raises_invalid_argument_types(self):
with self.assertRaises(ValueError):
computeLRF('((A,B),C);', '(A,(B,C));')


if __name__ == '__main__':
unittest.main()

0 comments on commit 3b409f8

Please sign in to comment.