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