def test_hypo(x): print x assert rle_decoder(rle_encoder(x)) == x
def test_invariant(): for x in [ 'adfdgdfgfdsg', 'asdsassasfgsdfhgjhgfdsdfghjhgfd']: assert rle_decoder(rle_encoder(x)) == x
def test_simple(): assert rle_decoder("f3g6") == "fffgggggg"
def test_dec(): assert rle_decoder("f4i5") == "ffffiiiii"
def test_simple_decoder(): assert rle_decoder('k3b3') == 'kkkbbb'
def test_advanced_decode(): assert rle_decoder("b3k3o9i5") == "bbbkkkoooooooooiiiii"
def test_simple_decode(): assert rle_decoder("b3k3") == "bbbkkk"
def test_advanced2(): assert rle_decoder("010:1") == "0000000000:"
def test_simple_decoder(): assert rle_decoder([("b", 3), ("k", 3)]) == 'bbbkkk'
def test_simple_decoder(): assert rle_decoder(['k3', 'b3']) == 'kkkbbb'