feat: extract featured artists from track title

This commit is contained in:
geoffrey45
2023-01-24 18:53:30 +03:00
parent df6609e7f4
commit 2ba1b0386e
7 changed files with 64 additions and 19 deletions
+18
View File
@@ -0,0 +1,18 @@
from app.utils import extract_featured_artists_from_title
def test_extract_featured_artists_from_title():
test_titles = [
"Own it (Featuring Ed Sheeran & Stormzy)",
"Godzilla (Deluxe)(Feat. Juice Wrld)(Deluxe)",
"Simmer (with Burna Boy)",
]
expected_test_artists = [
["Ed Sheeran", "Stormzy"],
['Juice Wrld'],
["Burna Boy"]
]
for title, expected in zip(test_titles, expected_test_artists):
assert extract_featured_artists_from_title(title) == expected