diff options
Diffstat (limited to '')
-rw-r--r-- | tests/scrapers/test_scraper.py | 2 | ||||
-rw-r--r-- | tests/scrapers/test_scraper_utils.py | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/scrapers/test_scraper.py b/tests/scrapers/test_scraper.py index 8492425..d0cef7b 100644 --- a/tests/scrapers/test_scraper.py +++ b/tests/scrapers/test_scraper.py @@ -20,7 +20,7 @@ class NoneScraper(Scraper): class WarningScraper(Scraper): is_available = True - def warn(self, str): + def warn(self, msg): raise ScrapeWarning("Invalid input") def scrape(self): diff --git a/tests/scrapers/test_scraper_utils.py b/tests/scrapers/test_scraper_utils.py index 4b02aad..30b9796 100644 --- a/tests/scrapers/test_scraper_utils.py +++ b/tests/scrapers/test_scraper_utils.py @@ -8,23 +8,23 @@ from hircine.scraper.utils import open_archive_file, parse_dict def test_parse_dict(): - dict = { + data = { "scalar": "foo", "list": ["bar", "baz"], "dict": {"nested_scalar": "qux", "nested_list": ["plugh", "xyzzy"]}, } - def id(type): - return lambda item: f"{type}_{item}" + def annotate(tag): + return lambda item: f"{tag}_{item}" parsers = { - "scalar": id("scalar"), - "list": id("list"), - "dict": {"nested_scalar": id("scalar"), "nested_list": id("list")}, - "missing": id("missing"), + "scalar": annotate("scalar"), + "list": annotate("list"), + "dict": {"nested_scalar": annotate("scalar"), "nested_list": annotate("list")}, + "missing": annotate("missing"), } - assert [f() for f in parse_dict(parsers, dict)] == [ + assert [f() for f in parse_dict(parsers, data)] == [ "scalar_foo", "list_bar", "list_baz", |