Refactored unit tests

This commit is contained in:
simon987
2018-04-21 22:43:38 -04:00
parent ef168a5cab
commit 75d7e8e3a8
73 changed files with 165 additions and 145 deletions

16
test/test_DocxParser.py Normal file
View File

@@ -0,0 +1,16 @@
from unittest import TestCase
from parsing import DocxParser
import os
dir_name = os.path.dirname(os.path.abspath(__file__))
class DocxParserTest(TestCase):
def test_parse_content(self):
parser = DocxParser([], 1000, dir_name + "/test_files/")
info = parser.parse(dir_name + "/test_files/docx1.docx")
self.assertEqual(len(info["content"]), 1000)