[BACKEND] Add double parenthesis test for chapter extraction (#390)
* [BACKEND] Add double parenthesis test for chapter extraction * lint
This commit is contained in:
parent
c47b504cb4
commit
e54bf7d467
1 changed files with 32 additions and 0 deletions
|
|
@ -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)"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue