예제 #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"))