mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
Further refactoring of book_handler logic into PDFParser
Also deletes the unnencessary abogen/book_handler and just use pyqt/book_hanlder
This commit is contained in:
@@ -175,10 +175,11 @@ class TestBookParser(unittest.TestCase):
|
||||
"""Test get_chapters returns correct list for different parsers."""
|
||||
# PDF
|
||||
parser_pdf = get_book_parser(self.sample_pdf_path)
|
||||
parser_pdf.process_content()
|
||||
chapters = parser_pdf.get_chapters()
|
||||
self.assertEqual(len(chapters), 2)
|
||||
self.assertEqual(chapters[0], ("page_1", "Page 1"))
|
||||
|
||||
self.assertEqual(chapters[0], ("page_1", "Page 1 - Page 1 content"))
|
||||
|
||||
# MD
|
||||
parser_md = get_book_parser(self.sample_md_path)
|
||||
parser_md.process_content() # Must process to get structure
|
||||
|
||||
Reference in New Issue
Block a user