コード例 #1
0
ファイル: test_mod.py プロジェクト: jpatel3/osmcha
def test_find_words():
    """Test the changeset.find_words function and the regular expressions."""
    suspect_words = WORDS['sources'] + WORDS['common']
    excluded_words = WORDS['exclude']

    assert find_words('import buildings', suspect_words)
    assert find_words('imported Importação unimportant', suspect_words,
                      excluded_words)
    assert not find_words('important edit', suspect_words, excluded_words)
    assert not find_words('Where is here?', suspect_words, excluded_words)
    assert find_words('GooGle is not important', suspect_words, excluded_words)
    assert not find_words('somewhere in the world', suspect_words,
                          excluded_words)
    assert find_words('дані по імпорту', suspect_words, excluded_words)
コード例 #2
0
ファイル: test_mod.py プロジェクト: willemarcel/osmcha
def test_find_words():
    """Test the changeset.find_words function and the regular expressions."""
    suspect_words = WORDS['sources'] + WORDS['common']
    excluded_words = WORDS['exclude']

    assert find_words('import buildings', suspect_words)
    assert find_words('imported Importação unimportant', suspect_words, excluded_words)
    assert not find_words('important edit', suspect_words, excluded_words)
    assert not find_words('Where is here?', suspect_words, excluded_words)
    assert find_words('GooGle is not important', suspect_words, excluded_words)
    assert not find_words('somewhere in the world', suspect_words, excluded_words)
    assert find_words('дані по імпорту', suspect_words, excluded_words)
    assert find_words('places from yandex', suspect_words, excluded_words)
    assert find_words('places from яндекс', suspect_words, excluded_words)
    assert find_words('places from 2gis', suspect_words, excluded_words)
    assert find_words('places from 2гис', suspect_words, excluded_words)