-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import unittest | ||
import os | ||
import textract | ||
|
||
class No_Ext_TestCase(unittest.TestCase): | ||
|
||
def test_docx(self): | ||
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
docx_file = os.path.join(current_dir, "tests/no_ext/docx_paragraphs_and_tables") | ||
# pass the file without extension and provide the extension as a parameter | ||
text = textract.process(docx_file, extension='docx') | ||
print(text) | ||
|
||
def test_msg(self): | ||
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
msg_file = os.path.join(current_dir, "tests/no_ext/msg_standardized_text") | ||
# pass the file without extension and provide the extension as a parameter | ||
text = textract.process(msg_file, extension='msg') | ||
print(text) | ||
|
||
def test_pdf(self): | ||
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
pdf_file = os.path.join(current_dir, "tests/no_ext/pdf_standardized_text") | ||
# pass the file without extension and provide the extension as a parameter | ||
text = textract.process(pdf_file, extension='.pdf') | ||
print(text) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters