[Tests] covert O_S_2f_2 doctests to unittest and moved to O_S_2f_2_test.py

This commit is contained in:
Cosimo Lupo 2017-01-16 19:58:30 +00:00
parent ae6059e234
commit ad6e8e606c
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -49,6 +49,13 @@ class OS2TableTest(unittest.TestCase):
# the bit 122 and the special bit 57 ('Non Plane 0') are also enabled # the bit 122 and the special bit 57 ('Non Plane 0') are also enabled
self.assertEqual(os2.recalcUnicodeRanges(font), {0, 7, 9, 57, 122}) self.assertEqual(os2.recalcUnicodeRanges(font), {0, 7, 9, 57, 122})
def test_intersectUnicodeRanges(self):
self.assertEqual(intersectUnicodeRanges([0x0410]), {9})
self.assertEqual(intersectUnicodeRanges([0x0410, 0x1F000]), {9, 57, 122})
self.assertEqual(
intersectUnicodeRanges([0x0410, 0x1F000], inverse=True),
(set(range(123)) - {9, 57, 122}))
if __name__ == "__main__": if __name__ == "__main__":
import sys import sys