mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-13 23:29:04 +00:00
Added pdf & epub parsing
This commit is contained in:
14
spec/PdfFileParser.py
Normal file
14
spec/PdfFileParser.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from unittest import TestCase
|
||||
from parsing import PdfFileParser
|
||||
|
||||
|
||||
class PdfParserTest(TestCase):
|
||||
|
||||
def test_parse_content(self):
|
||||
|
||||
parser = PdfFileParser([], 12488)
|
||||
|
||||
info = parser.parse("test_files/pdf1.pdf")
|
||||
|
||||
self.assertEqual(len(info["content"]), 12488)
|
||||
self.assertTrue(info["content"].startswith("Rabies\n03/11/2011\nRabies"))
|
||||
Reference in New Issue
Block a user