mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
feat: extract featured artists from track title
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user