示例#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'
    ]