      "\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",
      "        assert_equal(solution(2), set(['(())', \n",
      "                                       '()()']))\n",
      "        assert_equal(solution(3), set(['((()))', \n",
      "                                       '(()())', \n",
      "                                       '(())()', \n",
      "                                       '()(())', \n",
      "                                       '()()()']))\n",
      "        print('Success: test_pair_parentheses')\n",
      "\n",
      "\n",
      "def main():\n",
      "    test = TestPairParentheses()\n",
 
</s>
    "    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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\n",
    "                                                '()()()'])\n",
      "\n",
      "\n",
      "class TestPairParentheses(object):\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\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",
    "                                                '()()'])\n",
    "        assert_equal(parentheses.find_pair(3), ['((()))',\n",
    "                                                '(()())',\n",
    "                                                '(())()',\n",
    "                                                '()(())',\n",
    "                                                '()()()'])\n",
      "        print('Success: test_pair_parentheses')\n",
      "\n",
      "\n",
      "def main():\n",
      "    test = TestPairParentheses()\n",
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Rework n pairs parens challenge (#145)
recursion_dynamic/n_pairs_parentheses/n_pairs_parentheses_solution.ipynb