def test_glyph_color_layer_mapping(self, color_ufo): color_ufo.newGlyph("a").lib[COLOR_LAYER_MAPPING_KEY] = [("z_0", 0), ("z_1", 1)] filters = [] _init_explode_color_layer_glyphs_filter(color_ufo, filters) assert isinstance(filters[0], ExplodeColorLayerGlyphsFilter)
def test_no_color_layer_mapping(self, color_ufo): filters = [] _init_explode_color_layer_glyphs_filter(color_ufo, filters) assert not filters
def test_explicit_color_layers(self, color_ufo): color_ufo.lib[COLOR_LAYERS_KEY] = {"a": [("a.z_0", 1), ("a.z_1", 0)]} filters = [] _init_explode_color_layer_glyphs_filter(color_ufo, filters) assert not filters
def test_no_color_palettes(self, FontClass): ufo = FontClass() filters = [] _init_explode_color_layer_glyphs_filter(ufo, filters) assert not filters