Add more tests for parsing filenames

This commit is contained in:
Timmy Welch 2022-04-18 18:29:38 -07:00
parent 23f323f52d
commit 9a9d36dc65

View File

@ -1,6 +1,124 @@
import pytest
fnames = [
(
"Monster_Island_v1_2__repaired__c2c.cbz",
"stuff",
{
"issue": "2",
"series": "Monster Island",
"title": "The Wrath of Foobar-Man, Part 1 of 2",
"volume": "1",
"year": "",
"remainder": "repaired c2c",
"issue_count": "",
},
),
(
"Monster Island v1 3 (1957) -- The Revenge Of King Klong (noads).cbz",
"stuff",
{
"issue": "3",
"series": "Monster Island",
"title": "The Wrath of Foobar-Man, Part 1 of 2",
"volume": "1",
"year": "1957",
"remainder": "The Revenge Of King Klong (noads)",
"issue_count": "",
},
),
pytest.param(
"Foobar-Man Annual 121 - The Wrath of Foobar-Man, Part 1 of 2.cbz",
"stuff",
{
"issue": "121",
"series": "Foobar-Man Annual",
"title": "The Wrath of Foobar-Man, Part 1 of 2",
"volume": "",
"year": "",
"remainder": "",
"issue_count": "",
},
marks=pytest.mark.xfail,
),
(
"Plastic Man v1 002 (1942).cbz",
"stuff",
{
"issue": "2",
"series": "Plastic Man",
"title": "",
"volume": "1",
"year": "1942",
"remainder": "",
"issue_count": "",
},
),
(
"Blue Beetle 02.cbr",
"stuff",
{
"issue": "2",
"series": "Blue Beetle",
"title": "",
"volume": "",
"year": "",
"remainder": "",
"issue_count": "",
},
),
(
"Monster Island vol. 2 #2.cbz",
"stuff",
{
"issue": "2",
"series": "Monster Island",
"title": "",
"volume": "2",
"year": "",
"remainder": "",
"issue_count": "",
},
),
(
"Crazy Weird Comics 2 (of 2) (1969).rar",
"stuff",
{
"issue": "2",
"series": "Crazy Weird Comics",
"title": "",
"volume": "",
"year": "1969",
"remainder": "",
"issue_count": "2",
},
),
(
"Super Strange Yarns (1957) #92 (1969).cbz",
"stuff",
{
"issue": "92",
"series": "Super Strange Yarns",
"title": "",
"volume": "1957",
"year": "1969",
"remainder": "",
"issue_count": "",
},
),
(
"Action Spy Tales v1965 #3.cbr",
"stuff",
{
"issue": "3",
"series": "Action Spy Tales",
"title": "",
"volume": "1965",
"year": "",
"remainder": "",
"issue_count": "",
},
),
pytest.param(
" X-Men-V1-067.cbr",
"hyphen separated with hyphen in series",