This commit is contained in:
Jesse Bannon 2022-12-09 07:36:22 -08:00
parent df4cda1569
commit 725b1f164f

View file

@ -61,6 +61,7 @@ def chapter_description_2() -> str:
08. 19:40 Between Two Worlds 08. 19:40 Between Two Worlds
""" """
@pytest.fixture @pytest.fixture
def chapter_description_3() -> str: def chapter_description_3() -> str:
return """Tracklist Nightcore : return """Tracklist Nightcore :
@ -84,6 +85,7 @@ def chapter_description_3() -> str:
57:20 (Nightcore) Chime & Adam Tell - Whole 57:20 (Nightcore) Chime & Adam Tell - Whole
""" """
class TestChapters: class TestChapters:
def test_chapters_from_str_1(self, chapter_description_1): def test_chapters_from_str_1(self, chapter_description_1):
chapters = Chapters.from_string(chapter_description_1) chapters = Chapters.from_string(chapter_description_1)
@ -98,4 +100,7 @@ class TestChapters:
def test_chapters_from_str_3(self, chapter_description_3): def test_chapters_from_str_3(self, chapter_description_3):
chapters = Chapters.from_string(chapter_description_3) chapters = Chapters.from_string(chapter_description_3)
assert len(chapters) == 18 assert len(chapters) == 18
assert chapters.titles[8] == '(Nightcore) Electro-Light & Jordan Kelvin James - Wait For You (feat. Anna Yvette)' assert (
chapters.titles[8]
== "(Nightcore) Electro-Light & Jordan Kelvin James - Wait For You (feat. Anna Yvette)"
)