mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-14 15:49:04 +00:00
Refactored unit tests
This commit is contained in:
16
test/test_EbookParser.py
Normal file
16
test/test_EbookParser.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from unittest import TestCase
|
||||
from parsing import EbookParser
|
||||
import os
|
||||
|
||||
dir_name = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class EbookParserTest(TestCase):
|
||||
|
||||
def test_parse_content(self):
|
||||
|
||||
parser = EbookParser([], 1000, dir_name + "/test_files/")
|
||||
|
||||
info = parser.parse(dir_name + "/test_files/epub1.epub")
|
||||
|
||||
self.assertEqual(len(info["content"]), 1000)
|
||||
Reference in New Issue
Block a user