diff options
Diffstat (limited to 'Tests/otlLib/builder_test.py')
-rw-r--r-- | Tests/otlLib/builder_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/otlLib/builder_test.py b/Tests/otlLib/builder_test.py index bdfc6450..3ea5a745 100644 --- a/Tests/otlLib/builder_test.py +++ b/Tests/otlLib/builder_test.py @@ -2,7 +2,7 @@ import io import struct from fontTools.misc.fixedTools import floatToFixed from fontTools.misc.testTools import getXML -from fontTools.otlLib import builder +from fontTools.otlLib import builder, error from fontTools import ttLib from fontTools.ttLib.tables import otTables import pytest @@ -1101,6 +1101,12 @@ class ClassDefBuilderTest(object): assert not b.canAdd({"d", "e", "f"}) assert not b.canAdd({"f"}) + def test_add_exception(self): + b = builder.ClassDefBuilder(useClass0=True) + b.add({"a", "b", "c"}) + with pytest.raises(error.OpenTypeLibError): + b.add({"a", "d"}) + buildStatTable_test_data = [ ([ |