      def test_compress(self, func):
          assert_equal(func(None), None)
          assert_equal(func(''), '')
          assert_equal(func('AABBCC'), 'AABBCC')
          assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')
          print('Success: test_compress')
  
  
  def main():
      test = TestCompress()
 
</s> remove     "        assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')\n",
 </s> add     "        assert_equal(func('AAABCCDDDD'), 'A3BC2D4')\n", </s> remove     "            result += prev_char + str(count)\n",
 </s> add     "            result += prev_char + (str(count) if count > 1 else '')\n", </s> remove     "* 'AAABCCDDDD' -> 'A3B1C2D4'"
 </s> add     "* 'AAABCCDDDD' -> 'A3BC2D4'" </s> remove     "## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'.  Only compress the string if it saves space.\n",
 </s> add     "## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3BC2D4'.  Only compress the string if it saves space.\n",
        assert_equal(func('AAABCCDDDD'), 'A3BC2D4')
      def test_compress(self, func):
          assert_equal(func(None), None)
          assert_equal(func(''), '')
          assert_equal(func('AABBCC'), 'AABBCC')
        assert_equal(func('AAABCCDDDD'), 'A3BC2D4')
          print('Success: test_compress')
  
  
  def main():
      test = TestCompress()
keep keep keep keep replace keep keep keep keep keep
 Update compress solution so AAAAB becomes A4B.

Previously the solution would yield A4B1, which doesn't have as much compression. 
arrays_strings/compress/test_compress.py