def test_encode_empty(): assert encode('') == ''
def test_exeption(): with raises(TypeError): encode(111)
def test_encode(): assert encode('kkkkkbbbb') == [(5, 'k'), (4, 'b')]
def test_encode_emoji(): assert encode('😇') == [(1, '😇')] assert encode('😇😇😇😇😇') == [(5, '😇')]