1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

restore args to BrowserTests.run_test_case => 6/8 browser tests pass

This commit is contained in:
Joachim Wuttke (o) 2016-09-26 18:18:05 +02:00
parent bbab3f1430
commit 6c49775563

View File

@ -14,7 +14,8 @@ class BrowserTests(Common):
DEFAULT_PDF2HTMLEX_ARGS = [ DEFAULT_PDF2HTMLEX_ARGS = [
'--fit-width', 800, '--fit-width', 800,
'--last-page', 1, '--last-page', 1,
'--embed', 'fi', # avoid base64 to make it faster '--embed', 'FI', # with 'fi', test suite is currently broken (some directory interference)
# avoid base64 to make it faster
] ]
BROWSER_WIDTH=800 BROWSER_WIDTH=800
@ -28,7 +29,7 @@ class BrowserTests(Common):
def tearDownClass(cls): def tearDownClass(cls):
pass pass
def run_test_case(self, filename, pdf2htmlEX_args=[], page_must_load=True): def run_test_case(self, filename, args=[], page_must_load=True):
basefilename, extension = os.path.splitext(filename) basefilename, extension = os.path.splitext(filename)
self.assertEquals(extension.lower(), '.pdf', 'Input file is not PDF') self.assertEquals(extension.lower(), '.pdf', 'Input file is not PDF')
@ -37,7 +38,7 @@ class BrowserTests(Common):
ref_htmlfilename = os.path.join(ref_htmlfolder, htmlfilename) ref_htmlfilename = os.path.join(ref_htmlfolder, htmlfilename)
out_htmlfilename = os.path.join(self.OUTDIR, htmlfilename) out_htmlfilename = os.path.join(self.OUTDIR, htmlfilename)
pdf2htmlEX_args = self.DEFAULT_PDF2HTMLEX_ARGS + [ pdf2htmlEX_args = self.DEFAULT_PDF2HTMLEX_ARGS + args + [
os.path.join(self.TEST_DATA_DIR, filename), os.path.join(self.TEST_DATA_DIR, filename),
htmlfilename ] htmlfilename ]
result = self.run_pdf2htmlEX(pdf2htmlEX_args) result = self.run_pdf2htmlEX(pdf2htmlEX_args)