     "source": [
      "%%writefile test_n_pairs_parentheses.py\n",
      "from nose.tools import assert_equal\n",
      "\n",
      "class TestPairParentheses(object):\n",
      "\n",
      "    def test_pair_parentheses(self, solution):\n",
      "        assert_equal(solution(0), set([]))\n",
      "        assert_equal(solution(1), set(['()']))\n",
 
</s> remove     "# %load test_n_pairs_parentheses.py\n",
 </s> add     "%%writefile test_n_pairs_parentheses.py\n", </s> remove     "    \n",
 </s> add     "\n", </s> remove     "        assert_equal(solution(2), set(['(())', '()()']))\n",
    "        assert_equal(solution(3), set(['((()))','(()())', '(())()', '()(())', '()()()']))\n",
 </s> add     "        assert_equal(solution(2), set(['(())', \n",
    "                                       '()()']))\n",
    "        assert_equal(solution(3), set(['((()))', \n",
    "                                       '(()())', \n",
    "                                       '(())()', \n",
    "                                       '()(())', \n",
    "                                       '()()()']))\n",
    "\n",
     "source": [
      "%%writefile test_n_pairs_parentheses.py\n",
      "from nose.tools import assert_equal\n",
      "\n",
    "\n",
      "class TestPairParentheses(object):\n",
      "\n",
      "    def test_pair_parentheses(self, solution):\n",
      "        assert_equal(solution(0), set([]))\n",
      "        assert_equal(solution(1), set(['()']))\n",
keep keep keep add keep keep keep keep keep
 Cleaned up n pairs parentheses solution notebook and unit test. 
recursion_dynamic/n_pairs_parentheses/n_pairs_parentheses_solution.ipynb