#273: Remove nose dependency for recursion_dynamic/ (#280)

This commit is contained in:
Donne Martin
2020-07-13 21:26:50 -04:00
committed by GitHub
parent dce6b6aa67
commit 76cb6507fc
57 changed files with 548 additions and 751 deletions

View File

@@ -1,16 +1,16 @@
from nose.tools import assert_equal, assert_raises
import unittest
class TestLongestCommonSubstr(object):
class TestLongestCommonSubstr(unittest.TestCase):
def test_longest_common_substr(self):
str_comp = StringCompare()
assert_raises(TypeError, str_comp.longest_common_substr, None, None)
assert_equal(str_comp.longest_common_substr('', ''), '')
self.assertRaises(TypeError, str_comp.longest_common_substr, None, None)
self.assertEqual(str_comp.longest_common_substr('', ''), '')
str0 = 'ABCDEFGHIJ'
str1 = 'FOOBCDBCDE'
expected = 'BCDE'
assert_equal(str_comp.longest_common_substr(str0, str1), expected)
self.assertEqual(str_comp.longest_common_substr(str0, str1), expected)
print('Success: test_longest_common_substr')
@@ -20,4 +20,4 @@ def main():
if __name__ == '__main__':
main()
main()