#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

@@ -83,9 +83,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class StringCompare(object):\n",
@@ -112,25 +110,23 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %load test_longest_common_substr.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestLongestCommonSubstr(object):\n",
"class TestLongestCommonSubstr(unittest.TestCase):\n",
"\n",
" def test_longest_common_substr(self):\n",
" str_comp = StringCompare()\n",
" assert_raises(TypeError, str_comp.longest_common_substr, None, None)\n",
" assert_equal(str_comp.longest_common_substr('', ''), '')\n",
" self.assertRaises(TypeError, str_comp.longest_common_substr, None, None)\n",
" self.assertEqual(str_comp.longest_common_substr('', ''), '')\n",
" str0 = 'ABCDEFGHIJ'\n",
" str1 = 'FOOBCDBCDE'\n",
" expected = 'BCDE'\n",
" assert_equal(str_comp.longest_common_substr(str0, str1), expected)\n",
" self.assertEqual(str_comp.longest_common_substr(str0, str1), expected)\n",
" print('Success: test_longest_common_substr')\n",
"\n",
"\n",
@@ -169,9 +165,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.0"
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}