minor: fix 4-space indentation from PR 2441
This commit is contained in:
parent
de58709fd3
commit
8d6a7617a2
@ -41,7 +41,7 @@ def parseXML(xmlSnippet):
|
||||
def parseXmlInto(font, parseInto, xmlSnippet):
|
||||
parsed_xml = [e for e in parseXML(xmlSnippet.strip()) if not isinstance(e, str)]
|
||||
for name, attrs, content in parsed_xml:
|
||||
parseInto.fromXML(name, attrs, content, font)
|
||||
parseInto.fromXML(name, attrs, content, font)
|
||||
parseInto.populateDefaults()
|
||||
return parseInto
|
||||
|
||||
|
@ -689,29 +689,31 @@ def test_splitMarkBasePos():
|
||||
|
||||
class ColrV1Test(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.font = FakeFont(['.notdef', 'meh'])
|
||||
self.font = FakeFont(['.notdef', 'meh'])
|
||||
|
||||
def test_traverseEmptyPaintColrLayersNeedsNoLayerList(self):
|
||||
colr = parseXmlInto(self.font, otTables.COLR(),
|
||||
'''
|
||||
<Version value="1"/>
|
||||
<BaseGlyphList>
|
||||
<BaseGlyphPaintRecord index="0">
|
||||
<BaseGlyph value="meh"/>
|
||||
<Paint Format="1"><!-- PaintColrLayers -->
|
||||
<NumLayers value="0"/>
|
||||
<FirstLayerIndex value="42"/>
|
||||
</Paint>
|
||||
</BaseGlyphPaintRecord>
|
||||
</BaseGlyphList>
|
||||
''')
|
||||
paint = colr.BaseGlyphList.BaseGlyphPaintRecord[0].Paint
|
||||
|
||||
# Just want to confirm we don't crash
|
||||
visited = []
|
||||
paint.traverse(colr, lambda p: visited.append(p))
|
||||
assert len(visited) == 1
|
||||
colr = parseXmlInto(
|
||||
self.font,
|
||||
otTables.COLR(),
|
||||
'''
|
||||
<Version value="1"/>
|
||||
<BaseGlyphList>
|
||||
<BaseGlyphPaintRecord index="0">
|
||||
<BaseGlyph value="meh"/>
|
||||
<Paint Format="1"><!-- PaintColrLayers -->
|
||||
<NumLayers value="0"/>
|
||||
<FirstLayerIndex value="42"/>
|
||||
</Paint>
|
||||
</BaseGlyphPaintRecord>
|
||||
</BaseGlyphList>
|
||||
''',
|
||||
)
|
||||
paint = colr.BaseGlyphList.BaseGlyphPaintRecord[0].Paint
|
||||
|
||||
# Just want to confirm we don't crash
|
||||
visited = []
|
||||
paint.traverse(colr, lambda p: visited.append(p))
|
||||
assert len(visited) == 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user