#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

@@ -87,9 +87,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class MatrixMultiplicationCost(object):\n",
@@ -116,27 +114,25 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %load test_find_min_cost.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestMatrixMultiplicationCost(object):\n",
"class TestMatrixMultiplicationCost(unittest.TestCase):\n",
"\n",
" def test_find_min_cost(self):\n",
" matrix_mult_cost = MatrixMultiplicationCost()\n",
" assert_raises(TypeError, matrix_mult_cost.find_min_cost, None)\n",
" assert_equal(matrix_mult_cost.find_min_cost([]), 0)\n",
" self.assertRaises(TypeError, matrix_mult_cost.find_min_cost, None)\n",
" self.assertEqual(matrix_mult_cost.find_min_cost([]), 0)\n",
" matrices = [Matrix(2, 3),\n",
" Matrix(3, 6),\n",
" Matrix(6, 4),\n",
" Matrix(4, 5)]\n",
" expected_cost = 124\n",
" assert_equal(matrix_mult_cost.find_min_cost(matrices), expected_cost)\n",
" self.assertEqual(matrix_mult_cost.find_min_cost(matrices), expected_cost)\n",
" print('Success: test_find_min_cost')\n",
"\n",
"\n",
@@ -175,9 +171,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
}