      "* ' ', ' ' -> True\n",
      "* 'foobarbaz', 'barbazfoo' -> True"
     ]
    },
    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": true
     },
     "outputs": [],
     "source": [
      "from nose.tools import assert_equal\n",
      "\n",
      "class Test(object):\n",
      "    def test_is_rotation(self, func):\n",
      "        assert_equal(func('o', 'oo'), False)\n",
      "        assert_equal(func(None, 'foo'), False)\n",
      "        assert_equal(func('', 'foo'), False)\n",
      "        assert_equal(func('', ''), True)\n",
      "        assert_equal(func('foobarbaz', 'barbazfoo'), True)\n",
      "\n",
      "def run_tests(func):\n",
      "    test = Test()\n",
      "    test.test_is_rotation(func)"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Algorithm\n",
 
</s> remove     "run_tests(is_rotation)"
 </s> add     "class Test(object):\n",
    "    def test_is_rotation(self, func):\n",
    "        assert_equal(func('o', 'oo'), False)\n",
    "        assert_equal(func(None, 'foo'), False)\n",
    "        assert_equal(func('', 'foo'), False)\n",
    "        assert_equal(func('', ''), True)\n",
    "        assert_equal(func('foobarbaz', 'barbazfoo'), True)\n",
    "        print('Success: test_is_rotation')\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    test = Test()\n",
    "    test.test_is_rotation(is_rotation)" </s> remove     "    return is_substring(s2, s3)\n",
 </s> add     "    return is_substring(s2, s3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Unit Test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Success: test_is_rotation\n"
     ]
    }
   ],
   "source": [
    "from nose.tools import assert_equal\n", </s> remove    "execution_count": null,
 </s> add    "execution_count": 1, </s> remove     "* Is the string ASCII (extended)?  Or Unicode?\n",
    "    * ASCII extended, which is 256 characters\n",
 </s> add     "*Problem statements are sometimes intentionally ambiguous.  Asking clarifying questions, identifying constraints, and stating assumptions help to ensure you code the intended solution.*\n",
    "\n",
    "* Can I assume the string is ASCII?\n",
    "    * Yes\n",
    "    * Note: Unicode strings could require special handling depending on your language\n",
      "* ' ', ' ' -> True\n",
      "* 'foobarbaz', 'barbazfoo' -> True"
     ]
    },























    {
     "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 replace replace keep keep keep keep keep
 Reworked notebook: Added more detail to clarifying questions and test cases.  Reworked unit test. 
arrays-strings/rotation.ipynb