Cosimo Lupo
8bd83f36bd
woff2_test: add tests for transformed hmtx and untransformed glyf+loca
2019-06-13 18:46:46 +01:00
Cosimo Lupo
0162446f4c
woff2: don't normalize glyf+loca if we aren't transforming them
...
Also, the TTFont.getGlyphOrder() automatically makes up a dummy
glyph order from the maxp.numGlyphs, we simply need to ensure
'maxp' is decompiled before 'glyf'.
When transforming glyf, the glyf.glyphOrder is guaranteed to
be present (as the glyf table has been already decompiled), so
we don't need to deal with it being missing or incorrect
(hence removed spurious tests).
2019-06-12 18:41:13 +01:00
Cosimo Lupo
6b0e350a06
woff2_test: remove test for no longer reserved bits 6-7
2019-06-11 15:23:58 +01:00
Cosimo Lupo
9af92fdb41
woff2_test: fix up flaky tests
...
some tests were failing when shuffling the order of the tests with
pytest-randomly. That's because calling TTFont.getTableData method
on 'loca' table before having compiled 'glyf' returns an empty b""
string.
2019-06-11 13:22:38 +01:00
Sascha Brawer
6a7e299c09
Fix “DeprecationWarning: invalid escape sequence” in Python 3.7
2019-01-22 16:36:15 +01:00
Cosimo Lupo
c2263c2e8f
[woff2_test] use bytes instead of unicode literals in struct format strings
...
This is for compatiblity with Python older than 2.7.7.
See https://bugs.python.org/issue19099
> Issue #19099 : The struct module now supports Unicode format strings.
https://hg.python.org/cpython/raw-file/f89216059edf/Misc/NEWS
2017-02-21 14:31:57 +00:00
Cosimo Lupo
ae6059e234
[Tests] covert woff2 doctests to unittest and moved to woff2_test.py
2017-01-17 13:39:36 +00:00
Cosimo Lupo
3cdc800873
[Tests] rename all 'testdata' folders to simply 'data'
...
as it's now obvious what kind of data they are
2017-01-17 13:33:46 +00:00
Cosimo Lupo
e1d340cc65
[Tests] use absolute imports and add __init__.py where relevant
...
We can't use relative imports any more since the tests are now located outside the package.
I had to add __init__.py to Tests/feaLib/ so that pytest does not get confused by the presence
of two test files with the same basename: i.e. Tests/feaLib/builder_test.py and Tests/feaLib/builder_test.py
https://github.com/pytest-dev/pytest/issues/774
http://stackoverflow.com/questions/12582503/py-test-test-discovery-failure-when-tests-in-different-directories-are-called
2017-01-16 09:14:13 +00:00
Cosimo Lupo
78ad48eaf3
Move all *_test.py modules and test data to external Tests/ folder
2017-01-16 09:14:12 +00:00