Skip to content

Commit 5665afe

Browse files
committed
Added test for LCS
1 parent ed8e6d8 commit 5665afe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/lcs_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import unittest
2+
import lcs
3+
4+
class TestLCS(unittest.TestCase):
5+
def test_lcs(self):
6+
self.assertEqual(lcs.longest_common_subsequence("ABCD", "BBDABXYDCCAD"), (4, "ABCD"))
7+
self.assertEqual(lcs.longest_common_subsequence("BANANA", "ATANA"), (4, "AANA"))
8+
self.assertEqual(lcs.longest_common_subsequence("ABCDEFG", "BDGK"), (3, "BDG"))
9+
10+
if __name__ == "__main__":
11+
unittest.main()

0 commit comments

Comments
 (0)