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