mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
21 lines
484 B
Python
21 lines
484 B
Python
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('AAABCCDDDDE'), 'A3BC2D4E')
|
|
print('Success: test_compress')
|
|
|
|
|
|
def main():
|
|
test = TestCompress()
|
|
compress_string = CompressString()
|
|
test.test_compress(compress_string.compress)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main() |