[BACKEND] Add double parenthesis test for chapter extraction

This commit is contained in:
Jesse Bannon 2022-12-09 07:07:37 -08:00
parent c47b504cb4
commit df4cda1569

View file

@ -61,6 +61,28 @@ def chapter_description_2() -> str:
08. 19:40 Between Two Worlds
"""
@pytest.fixture
def chapter_description_3() -> str:
return """Tracklist Nightcore :
00:00 (Nightcore) Cartoon - On & On (feat. Daniel Levi)
03:02 (Nightcore) Cartoon - Why We Lose (feat. Coleman Trapp)
06:09 (Nightcore) Vanze - Forever (feat. Brenton Mattheus)
09:49 (Nightcore) Krale - Frontier (ft. Jasmina Lin & Jay Christopher)
13:11 (Nightcore) Jim Yosef - Forces (feat. Ivan Jamile & Kédo Rebelle)
17:01 (Nightcore) Janji - Heroes Tonight (feat. Johnning)
20:02 (Nightcore) Jim Yosef - Can't Wait (feat. Anna Yvette)
23:01 (Nightcore) Ship Wrek & Zookeepers - Ark
26:00 (Nightcore) Electro-Light & Jordan Kelvin James - Wait For You (feat. Anna Yvette)
29:28 (Nightcore) JJD - Adventure
34:19 (Nightcore) Halvorsen - She Got Me Like
36:42 (Nightcore) Desmeon - Hellcat
40:27 (Nightcore) Rameses B - Beside You (feat. Soundr)
44:46 (Nightcore) Axol - ILY
47:40 (Nightcore) ElementD - Fallin' (feat. Micah Martin)
50:24 (Nightcore) Futuristik - Little Bit (feat. Sethh)
54:39 (Nightcore) IZECOLD - Close (feat. Molly Ann)
57:20 (Nightcore) Chime & Adam Tell - Whole
"""
class TestChapters:
def test_chapters_from_str_1(self, chapter_description_1):
@ -72,3 +94,8 @@ class TestChapters:
chapters = Chapters.from_string(chapter_description_2)
assert len(chapters) == 8
assert chapters.timestamps[1].readable_str == "2:41"
def test_chapters_from_str_3(self, chapter_description_3):
chapters = Chapters.from_string(chapter_description_3)
assert len(chapters) == 18
assert chapters.titles[8] == '(Nightcore) Electro-Light & Jordan Kelvin James - Wait For You (feat. Anna Yvette)'