#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

@@ -101,9 +101,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class GraphDfs(Graph):\n",
@@ -141,18 +139,17 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %load test_dfs.py\n",
"from nose.tools import assert_equal\n",
"import unittest\n",
"\n",
"\n",
"class TestDfs(object):\n",
"class TestDfs(unittest.TestCase):\n",
"\n",
" def __init__(self):\n",
" def __init__(self, *args, **kwargs):\n",
" super(TestDfs, self).__init__()\n",
" self.results = Results()\n",
"\n",
" def test_dfs(self):\n",
@@ -169,7 +166,7 @@
" graph.add_edge(3, 2, 7)\n",
" graph.add_edge(3, 4, 8)\n",
" graph.dfs(nodes[0], self.results.add_result)\n",
" assert_equal(str(self.results), \"[0, 1, 3, 2, 4, 5]\")\n",
" self.assertEqual(str(self.results), \"[0, 1, 3, 2, 4, 5]\")\n",
"\n",
" print('Success: test_dfs')\n",
"\n",
@@ -209,9 +206,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
}