示例#1
0
def test_contains_doesnt_match_sub_words():
    msg = "racecar"
    assert_false(contains(msg, "race"))
示例#2
0
def test_contains_detects_word_in_beginning():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "hello"))
示例#3
0
def test_contains_detects_multiple_words():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "how is it"))
示例#4
0
def test_contains_detects_word_with_punctuation():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "everyone"))
示例#5
0
def test_contains_detects_word_in_middle():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "how"))