      "* '' -> ''\n",
      "* 'foo bar' -> 'rab oof'"
     ]
    },
    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": false
     },
     "outputs": [],
     "source": [
      "from nose.tools import assert_equal\n",
      "\n",
      "class Test(object):\n",
      "    def test_reversed(self, func):\n",
      "        assert_equal(func(None), None)\n",
      "        assert_equal(func(''), '')\n",
      "        assert_equal(func('foo bar'), 'rab oof')\n",
      "\n",
      "def run_tests(func):\n",
      "    test = Test()\n",
      "    test.test_reversed(func)"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Algorithm\n",
 
</s> remove     "run_tests(reverse_string_alt)\n",
    "run_tests(reverse_string_alt2)"
 </s> add     "class Test(object):\n",
    "    def test_reversed(self, func):\n",
    "        assert_equal(func(None), None)\n",
    "        assert_equal(func(''), '')\n",
    "        assert_equal(func('foo bar'), 'rab oof')\n",
    "        print('Success: test_reversed')\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    test = Test()\n",
    "    test.test_reversed(reverse_string)\n",
    "    test.test_reversed(reverse_string_alt)\n",
    "    test.test_reversed(reverse_string_alt2)" </s> remove     "    return ''.join(reversed(string))\n",
 </s> add     "    return ''.join(reversed(string))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Unit Test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Success: test_reversed\n",
      "Success: test_reversed\n",
      "Success: test_reversed\n"
     ]
    }
   ],
   "source": [
    "from nose.tools import assert_equal\n", </s> remove    "execution_count": null,
 </s> add    "execution_count": 2, </s> remove    "execution_count": null,
 </s> add    "execution_count": 1,
      "* '' -> ''\n",
      "* 'foo bar' -> 'rab oof'"
     ]
    },





















    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Algorithm\n",
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Reworked notebook: Added more detail to clarifying questions and test cases.  Reworked code and unit test. 
arrays-strings/reverse_string.ipynb