#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

@@ -116,9 +116,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class StringCompare(object):\n",
@@ -169,9 +167,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -183,19 +179,19 @@
],
"source": [
"%%writefile test_longest_common_subseq.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestLongestCommonSubseq(object):\n",
"class TestLongestCommonSubseq(unittest.TestCase):\n",
"\n",
" def test_longest_common_subseq(self):\n",
" str_comp = StringCompare()\n",
" assert_raises(TypeError, str_comp.longest_common_subseq, None, None)\n",
" assert_equal(str_comp.longest_common_subseq('', ''), '')\n",
" self.assertRaises(TypeError, str_comp.longest_common_subseq, None, None)\n",
" self.assertEqual(str_comp.longest_common_subseq('', ''), '')\n",
" str0 = 'ABCDEFGHIJ'\n",
" str1 = 'FOOBCDBCDE'\n",
" expected = 'BCDE'\n",
" assert_equal(str_comp.longest_common_subseq(str0, str1), expected)\n",
" self.assertEqual(str_comp.longest_common_subseq(str0, str1), expected)\n",
" print('Success: test_longest_common_subseq')\n",
"\n",
"\n",
@@ -211,9 +207,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -244,9 +238,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}