#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

@@ -174,9 +174,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"class Matrix(object):\n",
@@ -189,9 +187,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
@@ -231,9 +227,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -245,21 +239,21 @@
],
"source": [
"%%writefile 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",
@@ -275,9 +269,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -308,9 +300,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
}