mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-14 13:28:03 +00:00
Rename alt compress solution.
This commit is contained in:
21
arrays_strings/compress_alt/test_compress.py
Normal file
21
arrays_strings/compress_alt/test_compress.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from nose.tools import assert_equal
|
||||
|
||||
|
||||
class TestCompress(object):
|
||||
|
||||
def test_compress(self, func):
|
||||
assert_equal(func(None), None)
|
||||
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')
|
||||
|
||||
|
||||
def main():
|
||||
test = TestCompress()
|
||||
test.test_compress(compress_string)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user