mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-13 15:19:05 +00:00
Refactored unit tests
This commit is contained in:
25
test/test_SpreadSheetParser.py
Normal file
25
test/test_SpreadSheetParser.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from unittest import TestCase
|
||||
from parsing import SpreadSheetParser
|
||||
|
||||
import os
|
||||
|
||||
dir_name = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class PdfParserTest(TestCase):
|
||||
|
||||
def test_parse_content_xls(self):
|
||||
|
||||
parser = SpreadSheetParser([], 1500, "test_files/")
|
||||
|
||||
info = parser.parse(dir_name + "/test_files/xls1.xls")
|
||||
|
||||
self.assertEqual(len(info["content"]), 1500)
|
||||
|
||||
def test_parse_content_xlsx(self):
|
||||
|
||||
parser = SpreadSheetParser([], 1500, "test_files/")
|
||||
|
||||
info = parser.parse(dir_name + "/test_files/xlsx1.xlsx")
|
||||
|
||||
self.assertEqual(len(info["content"]), 1500)
|
||||
Reference in New Issue
Block a user