#273: Remove nose dependency for graphs_trees/ (#277)

This commit is contained in:
Donne Martin
2020-07-10 21:02:32 -04:00
committed by GitHub
parent 139e157250
commit abf7524c26
67 changed files with 860 additions and 1027 deletions

View File

@@ -142,12 +142,13 @@
"outputs": [],
"source": [
"# %load test_bfs.py\n",
"from nose.tools import assert_equal\n",
"import unittest\n",
"\n",
"\n",
"class TestBfs(object):\n",
"class TestBfs(unittest.TestCase):\n",
"\n",
" def __init__(self):\n",
" def __init__(self, *args, **kwargs):\n",
" super(TestBfs, self).__init__()\n",
" self.results = Results()\n",
"\n",
" def test_bfs(self):\n",
@@ -164,7 +165,7 @@
" graph.add_edge(3, 2, 7)\n",
" graph.add_edge(3, 4, 8)\n",
" graph.bfs(nodes[0], self.results.add_result)\n",
" assert_equal(str(self.results), \"[0, 1, 4, 5, 3, 2]\")\n",
" self.assertEqual(str(self.results), \"[0, 1, 4, 5, 3, 2]\")\n",
"\n",
" print('Success: test_bfs')\n",
"\n",
@@ -204,7 +205,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.2"
}
},
"nbformat": 4,