[Tests] covert O_S_2f_2 doctests to unittest and moved to O_S_2f_2_test.py
This commit is contained in:
parent
ae6059e234
commit
ad6e8e606c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user