diff --git a/tests/test_checks_universal.py b/tests/test_checks_universal.py index a66e5d7348..0e9a222173 100644 --- a/tests/test_checks_universal.py +++ b/tests/test_checks_universal.py @@ -1053,15 +1053,20 @@ def test_check_unreachable_glyphs(): assert glyph not in message ttFont = TTFont(TEST_FILE("notosansmath/NotoSansMath-Regular.ttf")) + ttFont.ensureDecompiled() # (required for mock glyph removal below) + glyph_order = ttFont.getGlyphOrder() + # upWhiteMediumTriangle is used as a component in circledTriangle, # since CFF does not have composites it became unused. # So that is a build tooling issue. message = assert_results_contain(check(ttFont), WARN, "unreachable-glyphs") assert "upWhiteMediumTriangle" in message - assert "upWhiteMediumTriangle" in ttFont.glyphOrder + assert "upWhiteMediumTriangle" in glyph_order - # Other than that problem, no other glyphs are unreachable: - ttFont.glyphOrder.remove("upWhiteMediumTriangle") + # Other than that problem, no other glyphs are unreachable; + # Remove the glyph and then try again. + glyph_order.remove("upWhiteMediumTriangle") + ttFont.setGlyphOrder(glyph_order) assert "upWhiteMediumTriangle" not in ttFont.glyphOrder assert_PASS(check(ttFont))