From 40865d6ce82c7b9747b31c57004a31909ca3b245 Mon Sep 17 00:00:00 2001 From: goon-foss Date: Wed, 16 Sep 2026 13:09:34 +0200 Subject: [PATCH] test(normalize): zlepek nazwiska nie przechodzi przez separator feat/ft Regula sklejki sasiednich czlonow (JoannaAngel, Bonnieb) nie byla pilnowana na granicy obsady: przy martwym separatorze "Dickft" i "Paigefeat" wychodzily jako trafienia. Trzy przypadki, ktore na starym regexie daly True, a teraz daja False. Co-Authored-By: Claude Opus 5 --- tests/test_normalize.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_normalize.py b/tests/test_normalize.py index e84b1b5..9712591 100644 --- a/tests/test_normalize.py +++ b/tests/test_normalize.py @@ -87,6 +87,11 @@ def test_strip_accents_idempotent() -> None: ("Sasha Paige ft.Martin Spell", "Martin Spell", True), # ft wewnatrz slowa to nie separator. ("Craft Beer Night", "Craft Beer", True), + # Zlepek tez nie przechodzi przez separator: „dick" i „ft" to sasiednie czlony + # tylko dopoki tytul nie jest ciety, a byly sklejane w jedno nazwisko. + ("Twins Sasha Paige Share the Dick ft. Martin Spell", "Dickft", False), + ("Sasha Paige feat Martin Spell", "Paigefeat", False), + ("Sasha Paige ft. Martin Spell", "Paige Ft Martin", False), ], ) def test_person_named_in(title: str, person: str, expected: bool) -> None: