def test_compute_edge_ngrams_honor_min_edge_ngrams_setting(config): config.MIN_EDGE_NGRAMS = 1 assert compute_edge_ngrams('abcd') == ['a', 'ab', 'abc']
def test_compute_edge_ngrams(): assert compute_edge_ngrams('vanbrechi') == [ 'van', 'vanb', 'vanbr', 'vanbre', 'vanbrec', 'vanbrech' ]
def test_compute_edge_ngrams_honor_max_edge_ngrams_setting(config): config.MAX_EDGE_NGRAMS = 5 assert compute_edge_ngrams('abcdefghijklmn') == ['abc', 'abcd', 'abcde']