11 Commits

Author SHA1 Message Date
Cosimo Lupo
a807ab2b93
tests: use math.isclose to compare float coordinates
using the default tolerance which is 1e-9, i.e. assures that two floats are the same
within about 9 decimal digits

https://docs.python.org/3/library/math.html#math.isclose
2018-09-26 12:13:39 +01:00
Cosimo Lupo
7dbe476f64
pens_test.py: fix test failure with latest defcon
somehow the segmentType of the first move point of a contour is a unicode string now, and the test was comparing the repr...
2018-09-05 19:20:37 +01:00
Cosimo Lupo
bda1884b8b
cli_test: test -e and --keep-direction options 2018-04-10 21:24:39 +01:00
Cosimo Lupo
2e2353621e
add cli_test.py 2018-04-10 21:04:48 +01:00
Cosimo Lupo
b93782d6b0
ufo_test: add tests for 'remember_curve_type' arg 2018-04-10 21:04:35 +01:00
Cosimo Lupo
b627a778bf
Don't stop at first incompatibilty, log errors, raise at the end
Based on Miguel Sousa's original PR and the following discussion:
https://github.com/googlei18n/cu2qu/pull/114

Instead of raising an error at the first incompatible glyph, we
let it continue (keeping the original contours unmodified when
that happens), and use logging to print error messages.

A new `IncompatibleFontsError` exception is raised at the end of
`fonts_to_quadratic` if any glyph has incompatible number or types
of segments. The exception instance has a `glyph_errors` attribute
(dict) which collects all the individual IncompatibleGlyphsError
keyed by glyph name.
2018-01-18 13:21:08 +00:00
Cosimo Lupo
0d00796e01 ufo_test: add tests for ufo.py module
100 % coverage.. yay! :)
2017-10-31 19:20:24 +00:00
Cosimo Lupo
3125f071c7 pens_test: capture deprecation warning 2017-10-31 18:18:59 +00:00
Cosimo Lupo
a414079f1a tests/data: add RobotoSubset-Bold.ufo
Will be used for testing fonts_to_quadratic
2017-10-31 14:11:49 +00:00
Cosimo Lupo
82084874c5 Upgrade RobotoSubset-Regular.ufo to UFO 3 2017-10-31 14:10:40 +00:00
Cosimo Lupo
9be3901795 move Lib/cu2qu/test to tests/ folder
There is no need to install the test suite with the package.
Let's put it outside like it's recommended by pytest.
2017-10-31 12:58:09 +00:00