From 206841bc5d795011cad57ecc4e742d4e8a51001d Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Fri, 30 Oct 2015 03:24:56 +0530 Subject: [PATCH] New test case to illustrate the improvements --- arrays_strings/compress/compress_solution.ipynb | 7 ++++--- arrays_strings/compress/test_compress.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arrays_strings/compress/compress_solution.ipynb b/arrays_strings/compress/compress_solution.ipynb index c1c5afc..3770c03 100644 --- a/arrays_strings/compress/compress_solution.ipynb +++ b/arrays_strings/compress/compress_solution.ipynb @@ -101,7 +101,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "metadata": { "collapsed": false }, @@ -172,7 +172,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 5, "metadata": { "collapsed": false }, @@ -197,6 +197,7 @@ " assert_equal(func(''), '')\n", " assert_equal(func('AABBCC'), 'AABBCC')\n", " assert_equal(func('AAABCCDDDD'), 'A3BCCD4')\n", + " assert_equal(func('aaBCCEFFFFKKMMMMMMP taaammanlaarrrr seeeeeeeeek tooo'), 'aaBCCEF4KKM6P ta3mmanlaar4 se9k to3')\n", " print('Success: test_compress')\n", "\n", "\n", @@ -211,7 +212,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 7, "metadata": { "collapsed": false }, diff --git a/arrays_strings/compress/test_compress.py b/arrays_strings/compress/test_compress.py index c527360..b15dde4 100644 --- a/arrays_strings/compress/test_compress.py +++ b/arrays_strings/compress/test_compress.py @@ -8,6 +8,7 @@ class TestCompress(object): assert_equal(func(''), '') assert_equal(func('AABBCC'), 'AABBCC') assert_equal(func('AAABCCDDDD'), 'A3BCCD4') + assert_equal(func('aaBCCEFFFFKKMMMMMMP taaammanlaarrrr seeeeeeeeek tooo'), 'aaBCCEF4KKM6P ta3mmanlaar4 se9k to3') print('Success: test_compress')