ensured tests are passing
This commit is contained in:
1 parent
fdd2fbd85a
commit
cdcd2eabe2
11 files changed
+37
-22
No files matched your search
@@ -1 +0,0 @@
|
||||
../pdfmajor
|
||||
@@ -1,7 +1,8 @@
|
||||
from pathlib import Path
|
||||
from unittest import TestCase, main
|
||||
|
||||
from pdfmajor.interpreter import PDFInterpreter, exceptions
|
||||
from pdfmajor.interpreter import PDFInterpreter
|
||||
from pdfmajor.execptions import UnicodeNotDefined
|
||||
|
||||
CURRENT_FOLDER = Path("./")
|
||||
|
||||
@@ -9,7 +10,7 @@ class BadUnicode(TestCase):
|
||||
def test_ensure_failure(self):
|
||||
pdf = PDFInterpreter(CURRENT_FOLDER / "tests" / "samples" / "pdf" / "bad-unicode.pdf", ignore_bad_chars=False)
|
||||
pages = list(pdf)
|
||||
with self.assertRaises(exceptions.PDFUnicodeNotDefined):
|
||||
with self.assertRaises(UnicodeNotDefined):
|
||||
list(pages[2])
|
||||
|
||||
def test_ensure_no_failure(self):
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
import logging
|
||||
from unittest import TestCase, main
|
||||
from io import BytesIO
|
||||
from pdfmajor.parser.PSStackParser import KWD, LIT, PSBaseParser, PSEOF, PSStackParser
|
||||
from pdfmajor.parser.PSStackParser import KWD, LIT, PSBaseParser, PSStackParser
|
||||
from pdfmajor.execptions import PSEOF
|
||||
|
||||
## Simplistic Test cases
|
||||
##
|
||||
|
||||
Reference in new issue
Block a user