Skip to content

Commit

Permalink
Merge pull request #85 from gandersen101/testing/ensure-regexsearch-p…
Browse files Browse the repository at this point in the history
…artial-matches-on-0-index

Adding Test for Partial Regex Search at 0 Index
  • Loading branch information
gandersen101 committed Mar 12, 2024
2 parents 01448ee + 7d3658c commit 7638605
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test__search/test_regexsearcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ def test_match_will_expand_on_partial_match_if_partials(
assert matches == [(5, 6, 100)]


def test_match_will_expand_on_partial_match_at_index_0(
searcher: RegexSearcher, nlp: Language
) -> None:
"""It extends partial matches to span boundaries - index 0 bug is fixed."""
doc = nlp("withh something")
matches = searcher.match(doc, "with")
assert matches == [(0, 1, 100)]


def test_match_on_german_combination_words(
searcher: RegexSearcher, nlp: Language
) -> None:
Expand Down

0 comments on commit 7638605

Please sign in to comment.