コード例 #1
0
ファイル: test_filters.py プロジェクト: rthoward/notifirc
def test_contains_doesnt_match_sub_words():
    msg = "racecar"
    assert_false(contains(msg, "race"))
コード例 #2
0
ファイル: test_filters.py プロジェクト: rthoward/notifirc
def test_contains_detects_word_in_beginning():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "hello"))
コード例 #3
0
ファイル: test_filters.py プロジェクト: rthoward/notifirc
def test_contains_detects_multiple_words():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "how is it"))
コード例 #4
0
ファイル: test_filters.py プロジェクト: rthoward/notifirc
def test_contains_detects_word_with_punctuation():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "everyone"))
コード例 #5
0
ファイル: test_filters.py プロジェクト: rthoward/notifirc
def test_contains_detects_word_in_middle():
    msg = "hello everyone, how is it going?"
    assert_true(contains(msg, "how"))