comicfn2dict/tests/test_comicfn2dict.py
AJ Slater 2a59ec4cbd
v0.2.1 (#7)
* update deps. bump version

* fix news

* update deps. update ruff. lint

* Support Python 3.9 (#6)

* lint

* update deps tests work against python 3.9

* bump version and news

---------

Co-authored-by: Timmy Welch <timmy@narnian.us>
2024-03-04 12:36:39 -08:00

23 lines
553 B
Python

"""Tests for filename parsing."""
from pprint import pprint
import pytest
from deepdiff.diff import DeepDiff
from comicfn2dict import ComicFilenameParser
from tests.comic_filenames import PARSE_FNS
@pytest.mark.parametrize("item", PARSE_FNS.items())
def test_parse_filename(item):
"""Test filename parsing."""
fn, defined_fields = item
md = ComicFilenameParser(fn, verbose=1).parse()
diff = DeepDiff(defined_fields, md, ignore_order=True)
print(fn)
pprint(defined_fields)
pprint(md)
pprint(diff)
assert not diff