      "collapsed": false
     },
     "outputs": [],
     "source": [
      "def compress_string(string):\n",
      "    if string is None or len(string) == 0:\n",
      "        return string\n",
      "    size = 0\n",
      "    count = 0\n",
      "    last_char_code = string[0]\n",
 
</s> remove     "string0 = None\n",
    "string1 = ''\n",
    "string2 = 'ABC'\n",
    "string3 = 'AAABCCDDDD'\n",
    "print(compress_string(string0))\n",
    "print(compress_string(string1))\n",
    "print(compress_string(string2))\n",
    "print(compress_string(string3))"
 </s> add     "run_tests(compress_string)" </s> remove     "string0 = None\n",
    "string1 = bytearray('')\n",
    "string2 = bytearray('ABC')\n",
    "string3 = bytearray('AAABCCDDDD')\n",
    "print(compress_string(string0))\n",
    "print(compress_string(string1))\n",
    "print(compress_string(string2))\n",
    "print(compress_string(string3))"
 </s> add     "run_tests(compress_string_alt)"
    "def compress_string_alt(string):\n",
      "collapsed": false
     },
     "outputs": [],
     "source": [
    "def compress_string_alt(string):\n",
      "    if string is None or len(string) == 0:\n",
      "        return string\n",
      "    size = 0\n",
      "    count = 0\n",
      "    last_char_code = string[0]\n",
keep keep keep keep replace keep keep keep keep keep
 Updated unit test to use nose and moved it to Test Case section. 
arrays-strings/compress.ipynb