mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-28 09:41:15 +00:00
feat: extract featured artists from track title
This commit is contained in:
1 parent
df6609e7f4
commit
2ba1b0386e
7 files changed
+64
-19
No files matched your search
Whitespace-only changes.
@@ -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