diff --git a/tests/unit/utils/test_chapters.py b/tests/unit/utils/test_chapters.py index dba87516..0f7e753b 100644 --- a/tests/unit/utils/test_chapters.py +++ b/tests/unit/utils/test_chapters.py @@ -62,6 +62,30 @@ def chapter_description_2() -> str: """ +@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): chapters = Chapters.from_string(chapter_description_1) @@ -72,3 +96,11 @@ 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)" + )