#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

@@ -98,9 +98,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"class Parentheses(object):\n",
@@ -137,9 +135,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -151,20 +147,20 @@
],
"source": [
"%%writefile test_n_pairs_parentheses.py\n",
"from nose.tools import assert_equal, assert_raises\n",
"import unittest\n",
"\n",
"\n",
"class TestPairParentheses(object):\n",
"class TestPairParentheses(unittest.TestCase):\n",
"\n",
" def test_pair_parentheses(self):\n",
" parentheses = Parentheses()\n",
" assert_raises(TypeError, parentheses.find_pair, None)\n",
" assert_raises(ValueError, parentheses.find_pair, -1)\n",
" assert_equal(parentheses.find_pair(0), [])\n",
" assert_equal(parentheses.find_pair(1), ['()'])\n",
" assert_equal(parentheses.find_pair(2), ['(())',\n",
" self.assertRaises(TypeError, parentheses.find_pair, None)\n",
" self.assertRaises(ValueError, parentheses.find_pair, -1)\n",
" self.assertEqual(parentheses.find_pair(0), [])\n",
" self.assertEqual(parentheses.find_pair(1), ['()'])\n",
" self.assertEqual(parentheses.find_pair(2), ['(())',\n",
" '()()'])\n",
" assert_equal(parentheses.find_pair(3), ['((()))',\n",
" self.assertEqual(parentheses.find_pair(3), ['((()))',\n",
" '(()())',\n",
" '(())()',\n",
" '()(())',\n",
@@ -184,9 +180,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
@@ -217,9 +211,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
}