예제 #1
0
def test_latin_and_punctuation():
    assert convert.utf_len(b"Hello!") == 6
예제 #2
0
def test_mixed():
    assert convert.utf_len("Hello! Привіт! こんにちは".encode('utf-8')) == 20
예제 #3
0
def test_empty_string():
    assert convert.utf_len(b"") == 0
예제 #4
0
def test_japanese():
    assert convert.utf_len("こんにちは".encode('utf-8')) == 5
예제 #5
0
def test_cyrillic():
    assert convert.utf_len("Привіт!".encode('utf-8')) == 7
예제 #6
0
def test_empty_string():
    """

    :return:
    """
    assert convert.utf_len(b"") == 0
예제 #7
0
def test_japanese():
    """

    :return:
    """
    assert convert.utf_len("こんにちは".encode('utf-8')) == 5
예제 #8
0
def test_latin_and_punctuation():
    """

    :return:
    """
    assert convert.utf_len(b"Hello!") == 6