예제 #1
0
def test_tokenize_with_spaces():
    assert tokenize('Hello there friend') == ['Hello', 'there', 'friend']
예제 #2
0
def test_tokenize_mix_alphanumeric():
    assert tokenize('123hello l33t__w0rds') == ['123hello', 'l33t', 'w0rds']
예제 #3
0
def test_tokenize_with_unicode_symbols():
    assert tokenize('Emoji🤓are👍fun') == ['Emoji', 'are', 'fun']
예제 #4
0
def test_tokenize_numbers():
    assert tokenize('123_345 90!22*66') == ['123', '345', '90', '22', '66']
예제 #5
0
def test_tokenize_with_underscores():
    assert tokenize('So_many__underscores') == ['So', 'many', 'underscores']
예제 #6
0
def test_tokenize_with_multiple_delimiters():
    assert tokenize('So    many    spaces') == ['So', 'many', 'spaces']
예제 #7
0
def test_tokenize_with_mixed_characters():
    assert tokenize('This,sentence!is crazy') == [
        'This', 'sentence', 'is', 'crazy'
    ]
예제 #8
0
def test_tokenize_with_commas():
    assert tokenize('my,spacebar,is,broken') == [
        'my', 'spacebar', 'is', 'broken'
    ]