     "execution_count": null,
     "metadata": {
      "collapsed": false
     },
     "outputs": [],
     "source": [
      "print('Push on an empty stack')\n",
      "capacity = 2\n",
      "stacks = SetOfStacks(capacity)\n",
      "stacks.push(3)\n",
 
</s> remove     "print('Push on an empty stack')\n",
    "capacity = 2\n",
    "stacks = SetOfStacks(capacity)\n",
    "stacks.push(3)\n",
    "print('Push on a non-empty stack')\n",
    "stacks.push(5)\n",
    "print('Push on a capacity stack to create a new one')\n",
    "stacks.push('a')\n",
    "print('Pop on a one element stack to destroy it')\n",
    "print(stacks.pop())\n",
    "print('Pop general case')\n",
    "print(stacks.pop())\n",
    "print(stacks.pop())\n",
    "print('Pop on no elements')\n",
    "print(stacks.pop())"
 </s> add     "from nose.tools import assert_equal\n",
    "\n",
    "class Test(object):\n",
    "    def test_set_of_stacks(self):\n",
    "        print('Test: Push on an empty stack')\n",
    "        capacity = 2\n",
    "        stacks = SetOfStacks(capacity)\n",
    "        stacks.push(3)\n",
    "\n",
    "        print('Test: Push on a non-empty stack')\n",
    "        stacks.push(5)\n",
    "\n",
    "        print('Test: Push on a capacity stack to create a new one')\n",
    "        stacks.push('a')\n",
    "\n",
    "        print('Test: Pop on a one element stack to destroy it')\n",
    "        assert_equal(stacks.pop(), 'a')\n",
    "\n",
    "        print('Test: Pop general case')\n",
    "        assert_equal(stacks.pop(), 5)\n",
    "        assert_equal(stacks.pop(), 3)\n",
    "\n",
    "        print('Test: Pop on no elements')\n",
    "        assert_equal(stacks.pop(), None)\n",
    "        \n",
    "        print('Success: test_set_of_stacks')\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    test = Test()\n",
    "    test.test_set_of_stacks()" </s> remove    "execution_count": null,
 </s> add    "execution_count": 3, </s> remove    "execution_count": null,
 </s> add    "execution_count": 2, </s> remove    "execution_count": null,
 </s> add    "execution_count": 1,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test: Push on an empty stack\n",
      "Test: Push on a non-empty stack\n",
      "Test: Push on a capacity stack to create a new one\n",
      "Test: Pop on a one element stack to destroy it\n",
      "Test: Pop general case\n",
      "Test: Pop on no elements\n",
      "Success: test_set_of_stacks\n"
     ]
    }
   ],
     "execution_count": null,
     "metadata": {
      "collapsed": false
     },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test: Push on an empty stack\n",
      "Test: Push on a non-empty stack\n",
      "Test: Push on a capacity stack to create a new one\n",
      "Test: Pop on a one element stack to destroy it\n",
      "Test: Pop general case\n",
      "Test: Pop on no elements\n",
      "Success: test_set_of_stacks\n"
     ]
    }
   ],
     "source": [
      "print('Push on an empty stack')\n",
      "capacity = 2\n",
      "stacks = SetOfStacks(capacity)\n",
      "stacks.push(3)\n",
keep keep keep keep replace keep keep keep keep keep
 Reworked notebook: Added more detail to constraints and test cases.  Reworked unit test. 
stacks-queues/set-of-stacks.ipynb