Fix mock builder test
This commit is contained in:
parent
85edf0e380
commit
e3e12fe60d
@ -13,6 +13,7 @@ from fontTools.otlLib.builder import (
|
|||||||
ClassPairPosSubtableBuilder,
|
ClassPairPosSubtableBuilder,
|
||||||
PairPosBuilder,
|
PairPosBuilder,
|
||||||
SinglePosBuilder,
|
SinglePosBuilder,
|
||||||
|
ChainContextualRule
|
||||||
)
|
)
|
||||||
from fontTools.otlLib.error import OpenTypeLibError
|
from fontTools.otlLib.error import OpenTypeLibError
|
||||||
from fontTools.ttLib import TTFont
|
from fontTools.ttLib import TTFont
|
||||||
@ -79,7 +80,7 @@ def test_chain_pos_references_GSUB_lookup(ttfont):
|
|||||||
location = MockBuilderLocation((0, "alpha"))
|
location = MockBuilderLocation((0, "alpha"))
|
||||||
builder = ChainContextPosBuilder(ttfont, location)
|
builder = ChainContextPosBuilder(ttfont, location)
|
||||||
builder2 = SingleSubstBuilder(ttfont, location)
|
builder2 = SingleSubstBuilder(ttfont, location)
|
||||||
builder.rules.append(([], [], [], [[builder2]]))
|
builder.rules.append(ChainContextualRule([], [], [], [[builder2]]))
|
||||||
|
|
||||||
with pytest.raises(OpenTypeLibError, match="0:alpha: Missing index of the specified lookup, might be a substitution lookup"):
|
with pytest.raises(OpenTypeLibError, match="0:alpha: Missing index of the specified lookup, might be a substitution lookup"):
|
||||||
builder.build()
|
builder.build()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user