[tests/extractor] improve example URL mismatch error message (#7872)

This commit is contained in:
Mike Fährmann
2025-07-22 16:45:23 +02:00
parent 05cba49062
commit afc5b9c9c6

View File

@@ -150,8 +150,11 @@ class TestExtractorModule(unittest.TestCase):
if cls.category == "ytdl":
continue
extr = cls.from_url(cls.example)
if not extr and cls.basecategory and not cls.instances:
continue
if not extr:
if cls.basecategory and not cls.instances:
continue
self.fail(f"{cls.__name__} pattern does not match "
f"example URL '{cls.example}'")
extr.request = fail_request
extr.initialize()