From c2afb9d01b854bb709345c1b33bdba741daceb25 Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 19 Aug 2026 05:25:14 -0400 Subject: fix: skip tests if no ebooklib --- tests/test_extractors.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_extractors.py') diff --git a/tests/test_extractors.py b/tests/test_extractors.py index d604351..ae1794c 100644 --- a/tests/test_extractors.py +++ b/tests/test_extractors.py @@ -153,6 +153,10 @@ class ExtractBookTests(unittest.TestCase): self.assertEqual(len(book.sections), 1) def test_epub_metadata_harvested(self): + try: + import ebooklib # noqa: F401 + except ImportError: + self.skipTest("ebooklib not installed") from converter.extractors import extract_book with tempfile.TemporaryDirectory() as tmp: -- cgit v1.2.3