Add regression corpus and opt-in catalog test route
This commit is contained in:
1 parent
476cbb0116
commit
c7b19d1310
7 files changed
+491
-13
No files matched your search
@@ -126,6 +126,20 @@ def test_product_evidence_has_priority_over_service_words(matcher: CatalogMatche
|
||||
assert result.candidates[0].sku == "BIT-0077"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("brand", ["makita", "макита", "макиты", "макиту"])
|
||||
def test_makita_transliterations_share_the_same_brand_alias(
|
||||
matcher: CatalogMatcher, brand: str
|
||||
) -> None:
|
||||
result = matcher.match(f"шуруповерт как у {brand}, только дешевле")
|
||||
|
||||
assert result.status == "ambiguous"
|
||||
assert [candidate.sku for candidate in result.candidates] == [
|
||||
"INS-0010",
|
||||
"INS-0017",
|
||||
"INS-0003",
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("query", ["шурпуоверт на 12в", "шураыввавёрт на 12в"])
|
||||
def test_product_type_survives_typos(matcher: CatalogMatcher, query: str) -> None:
|
||||
result = matcher.match(query)
|
||||
|
||||
Reference in new issue
Block a user