Skip to content

Commit

Permalink
add adddinatl test
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Dec 2, 2024
1 parent 51c4954 commit a4796c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_computeLRF.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
from pylabeledrf.computeLRF import *
import dendropy
from dendropy.calculate.treecompare import symmetric_difference
import sys
import os

Expand All @@ -18,11 +19,13 @@ def test_computeLRF1(self):
t2 = mutateLabeledTree(self.t1, 3)
res = computeLRF(self.t1,t2)
self.assertLessEqual(res,3)
self.assertGreaterEqual(res, symmetric_difference(self.t1, t2))

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

def test_computeLRF2(self):
# randomise the labels and compute the distance
Expand Down

0 comments on commit a4796c4

Please sign in to comment.