V10.393 refine bundle plus matching
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s
This commit is contained in:
@@ -797,6 +797,35 @@ def test_marketplace_matcher_rejects_fragrance_formula_and_finish_variant_mismat
|
||||
assert expected_reason in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_ignores_sunscreen_and_model_plus_markers_for_bundle_count():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
cases = [
|
||||
(
|
||||
"【O.P.I】受損型硬甲油記得卸組-亮麗增強基礎護甲油15mL+專業去光水110mL-NTT80+AL414(禮物/官方直營)",
|
||||
"OPI 護甲油記得卸組(亮麗增強基礎護甲油15mL+去光水110mL)",
|
||||
),
|
||||
(
|
||||
"【Neutrogena 露得清】新品上市★水感透亮防曬乳SPF50+ PA++++(40mlx2入組)",
|
||||
"露得清水感透亮防曬乳SPF50+ 40ml *2入",
|
||||
),
|
||||
(
|
||||
"【AGE20】輕透光潤色素顏霜(SPF50+/PA++++/台灣總代理)",
|
||||
"AGE20’S 輕透光潤色素顏霜SPF50+/PA++++",
|
||||
),
|
||||
(
|
||||
"【Estee Lauder 雅詩蘭黛】粉持久完美鎖妝氣墊粉餅(SPF45/PA+++/一盒一蕊/IU同款)",
|
||||
"【ESTEE LAUDER雅詩蘭黛】粉持久完美鎖妝氣墊粉餅SPF45/PA+++",
|
||||
),
|
||||
]
|
||||
|
||||
for momo_name, competitor_name in cases:
|
||||
diagnostics = score_marketplace_match(momo_name, competitor_name, momo_price=1000, competitor_price=900)
|
||||
assert diagnostics.hard_veto is False
|
||||
assert diagnostics.score >= 0.76
|
||||
assert "multi_component_count_conflict" not in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_multi_variant_catalog_listings():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
@@ -822,6 +851,31 @@ def test_marketplace_matcher_promotes_multi_variant_catalog_listings():
|
||||
assert "catalog_variant_listing_alignment" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_requires_non_brand_product_line_evidence():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【CEZANNE】柔潤腮紅",
|
||||
"Cezanne",
|
||||
)
|
||||
|
||||
assert diagnostics.score < 0.76
|
||||
assert "strong_product_line_match" not in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_baan_lip_catalog_with_same_options():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【Baan 貝恩】嬰兒修護唇膏(草莓/原味) 4.5g/個 (新東海藥局)",
|
||||
"【貝恩】嬰兒修護唇膏(原味/草莓)",
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert "catalog_variant_listing_alignment_baan_lip" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_rejects_refill_core_vs_case_only_pack():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user