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