Behdad Esfahbod
fdbf066a8c
[glyf] Add __bool__ / __nonzero__ to GlyphCoordintes
...
I'm really unhappy that doctests do NOT work anymore :(.
2017-04-05 15:43:14 +02:00
Cosimo Lupo
e6f39f855c
[tables_test] minor: fix docstrings
2017-03-13 11:28:39 +00:00
Sascha Brawer
989270afc5
[AAT] Use ☃ instead of 🌍 to test non-ASCII characters
...
On some Python builds, Unicode characters above U+FFFF get escaped
to two question marks ?? instead of just one ?. This is not a real
problem, but for testing it is a nuisance when the results depend
on the platform.
2017-03-10 20:20:22 +08:00
Sascha Brawer
ea1adf42a7
[AAT] Add Char64 converter for 64-byte ASCII character strings
...
Used by Apple Advanced Typography tables, for example `gcid`.
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gcid.html
https://github.com/fonttools/fonttools/issues/178
2017-03-10 20:20:22 +08:00
Sascha Brawer
d7a298f36d
[otConverters] Add unit test for otConverters.UInt8
...
This class had been added in the `morx` branch, and I wanted
to merge it into master. While writing tests for it, I noticed
that `otConverters` has meanwhile been extended by an `UInt8`
converter. Therefore, only adding a test for the existing
implementation.
2017-03-09 20:52:26 +01:00
Sascha Brawer
910edb47df
[otConverters] Add unit test for otConverters.Long
...
I've got some changes in the `morx` branch which I'd like to merge
into master. So I'm writing this unit test as an example how to
test `otConverter` code.
2017-03-09 20:41:34 +01:00
Cosimo Lupo
0fc9313e79
[C_F_F__2_test] fix path to test data files
2017-03-05 22:53:05 +00:00
ReadRoberts
f208bf3421
1) Fold back in the changes introduced by Just van Possum in patch 744
...
2) Moved the C_F_F__2_test.py files and script under Tests/, paralleling what was done the C_F_F test files.
2017-03-05 22:53:05 +00:00
Cosimo Lupo
8b3255111c
Merge pull request #867 from miguelsousa/hhea-fix
...
[tests] Change `hhea` and `vhea` table version from float to hex to mute fontTools warnings
2017-03-03 08:19:01 +00:00
Cosimo Lupo
9fbefd1d71
[test_tables] minor whitespace
2017-03-02 13:40:41 +00:00
Cosimo Lupo
9c6aaf0bf6
[test_tables] skip cmap tests when unicodedata2 is not installed
...
When the tests are run with `python setup.py test` (e.g. from the ./run-tests.sh
script), we can't have setuptools install pre-compiled wheels for extra test
requirements (e.g. Brotli, unicodedata2).
Instead of failing, it's better that we skip the tests that have such extra
requirements.
NOTE: The recommended way to run the full test suite is by using tox
(like we do on the CI), or by installing pytest and the rests of requirements.txt,
and then run `pytest` command directly.
2017-03-02 13:34:39 +00:00
Cosimo Lupo
0a9ab169fe
[test_tables] remove unused import
2017-03-02 13:30:12 +00:00
Cosimo Lupo
43bf2c4cb4
[aots/cmap4_font4.ttx.cmap] 0x37f is "GREEK CAPITAL LETTER YOT"
2017-03-02 13:29:06 +00:00
Cosimo Lupo
937bf40c11
[tables_test] dynamically parametrize tests using 'pytest_generate_tests'
...
pytest provides built-in support for implementing your custom dynamic
parametrization schemes:
http://doc.pytest.org/en/latest/parametrize.html#pytest-generate-tests
2017-03-02 10:57:26 +00:00
Cosimo Lupo
fca44b495c
[aots/data] rename OS2 -> OS_2 like in xml table tags; add sfntVersion where missing
2017-03-02 10:57:26 +00:00
Behdad Esfahbod
f652c405e3
[WIP] Add test fonts from AOTS and start of a driver, copied from mtiLib
2017-03-02 10:57:25 +00:00
Miguel Sousa
306882a00a
[tests] Change hhea
and vhea
table version from float to hex to mute fontTools warnings
2017-02-28 16:35:13 -08:00
Denis Moyogo Jacquerye
891405fd68
TupleVariation: round deltas before encoding ( #861 )
...
* TupleVariationTest.test_compileDeltaValues(): also test floats
* TupleVariation: round deltas before encoding
Python 3 was raising 'struct.error: required argument is not an integer' and Python 2 was truncating when deltas are floats
2017-02-24 08:58:41 -08: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
Sascha Brawer
706858646a
Preserve ordering of glyph alternates when round-tripping through TTX
...
Also fixes a bug where glyph alternates in MTI feature files were
wrongly sorted by glyph name. After this change, the output is using
the same ordering as in the input MTI feature file.
Fixes https://github.com/fonttools/fonttools/issues/833 .
2017-02-11 17:08:56 +01:00
Jens Kutilek
a8151d46c2
Revert "Now with correct test program file"
...
This reverts commit ff9c046299ae016adf19a8e327efbe3093d11c33.
2017-01-24 16:30:13 +01:00
Jens Kutilek
5d3b4eb4c0
Tell XMLWriter what newline character to use
2017-01-24 16:23:06 +01:00
Jens Kutilek
ff9c046299
Now with correct test program file
2017-01-24 16:22:45 +01:00
Jens Kutilek
2135ef25e6
Revert "No newline at end of file"
...
This reverts commit c043cfbb4698b7cb54fe236b9fed52e5857776ab.
2017-01-24 16:06:10 +01:00
Jens Kutilek
c043cfbb46
No newline at end of file
2017-01-24 16:01:44 +01:00
Jens Kutilek
22391398b0
Fix merge conflict
2017-01-24 15:46:40 +01:00
Cosimo Lupo
12b8e9284e
[data/ttProgram.ttx] add newline at the end of XML file to match b83b358
2017-01-24 14:35:55 +00:00
Jens Kutilek
828a58aacb
Better fix for checking line endings, use UnicodeIO instead of BytesIO
2017-01-24 15:30:32 +01:00
Jens Kutilek
c9bdda2bc3
Ignore line endings
2017-01-24 14:05:18 +01:00
Jens Kutilek
15b2f465b9
Add test for assembly indentation
2017-01-24 13:50:24 +01:00
Cosimo Lupo
adaf708ae0
[Tests] convert ttProgram doctests into ttProgram_test.py
2017-01-17 13:39:37 +00:00
Cosimo Lupo
4ef3f1dd42
[Tests] convert GlyphCoordinates doctests into _g_l_y_f_test.py
2017-01-17 13:39:37 +00:00
Cosimo Lupo
a2066c9fbe
[Tests] convert _f_p_g_m doctests into _f_p_g_m_test.py
2017-01-17 13:39:37 +00:00
Cosimo Lupo
ad6e8e606c
[Tests] covert O_S_2f_2 doctests to unittest and moved to O_S_2f_2_test.py
2017-01-17 13:39:37 +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
8fe1a874ff
[Tests] covert sfnt doctests into sfnt_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