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

improving tests

disable ttfautohint in test refs
This commit is contained in:
Lu Wang 2014-11-18 23:34:48 +08:00
parent 128e7982fe
commit 2bda9bb3ec
9 changed files with 3 additions and 10 deletions

1
test/.gitattributes vendored
View File

@ -1 +1,2 @@
*.pdf binary
*.woff binary

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
import unittest
import os
import subprocess
import shutil
@ -9,11 +8,9 @@ from PIL import Image, ImageChops
from test import Common
class BrowserTests(Common):
TTFAUTOHINT = 'ttfautohint'
TEST_DATA_DIR = os.path.join(Common.TEST_DIR, 'browser_tests')
DEFAULT_PDF2HTMLEX_ARGS = [
'--external-hint-tool', 'ttfautohint',
'--fit-width', 800,
'--last-page', 1,
'--correct-text-visibility', 1,
@ -25,8 +22,7 @@ class BrowserTests(Common):
@classmethod
def setUpClass(cls):
exit_code = subprocess.call([cls.TTFAUTOHINT, '--version'])
assert (exit_code == 0), 'Cannot execute ' + cls.TTFAUTOHINT
pass
@classmethod
def tearDownClass(cls):
@ -75,7 +71,7 @@ class BrowserTests(Common):
if self.SAVE_TMP:
# save the diff image
# http://stackoverflow.com/questions/15721484/saving-in-png-using-pil-library-after-taking-imagechops-difference-of-two-png
diff_img.convert('RGB').save(os.path.join(png_out_dir, basefilename + '.diff.png'))
diff_img.crop(diff_img.getbbox()).convert('RGB').save(os.path.join(png_out_dir, basefilename + '.diff.png'))
self.fail('PNG files differ')
def test_basic_text(self):

View File

@ -1,11 +1,7 @@
#!/usr/bin/env python
import unittest
import os
import subprocess
import shutil
from PIL import Image, ImageChops
from selenium import webdriver
from browser_tests import BrowserTests