diff options
Diffstat (limited to 'scripts/run_android_tests.py')
-rw-r--r-- | scripts/run_android_tests.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/run_android_tests.py b/scripts/run_android_tests.py index 7880039..090d071 100644 --- a/scripts/run_android_tests.py +++ b/scripts/run_android_tests.py @@ -5,6 +5,8 @@ import glob import unittest from fontTools import ttLib +from nototools import coverage +from nototools import font_data def load_fonts(): @@ -45,5 +47,28 @@ class TestDigitWidths(unittest.TestCase): self.assertEqual(len(set(widths)), 1) +class TestCharacterCoverage(unittest.TestCase): + """Tests character coverage.""" + + def setUp(self): + self.fonts = load_fonts() + + def test_lack_of_arrows_and_combining_keycap(self): + """Tests that arrows and combining keycap are not in the fonts.""" + for font in self.fonts: + charset = coverage.character_set(font) + self.assertNotIn(0x20E3, charset) # COMBINING ENCLOSING KEYCAP + self.assertNotIn(0x2191, charset) # UPWARDS ARROW + self.assertNotIn(0x2193, charset) # DOWNWARDS ARROW + + def test_inclusion_of_sound_recording_copyright(self): + """Tests that sound recording copyright symbol is in the fonts.""" + for font in self.fonts: + charset = coverage.character_set(font) + self.assertIn( + 0x2117, charset, # SOUND RECORDING COPYRIGHT + 'U+2117 not found in %s.' % font_data.font_name(font)) + + if __name__ == '__main__': unittest.main() |