Test absent hex attribute on unicode element
(currently fails)
This commit is contained in:
parent
308b449edc
commit
c7be064ef6
@ -300,6 +300,22 @@ class TestGLIF1(unittest.TestCase):
|
|||||||
self.assertRaises(GlifLibError, self.pyToGLIF, py)
|
self.assertRaises(GlifLibError, self.pyToGLIF, py)
|
||||||
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
||||||
|
|
||||||
|
def testUnicodes_hex_present(self):
|
||||||
|
"""Test that a present <unicode> element must have a
|
||||||
|
'hex' attribute; by testing that an invalid <unicode>
|
||||||
|
element raises an appropriate error.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# illegal
|
||||||
|
glif = """
|
||||||
|
<glyph name="a" format="1">
|
||||||
|
<unicode />
|
||||||
|
<outline>
|
||||||
|
</outline>
|
||||||
|
</glyph>
|
||||||
|
"""
|
||||||
|
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
||||||
|
|
||||||
def testNote(self):
|
def testNote(self):
|
||||||
glif = """
|
glif = """
|
||||||
<glyph name="a" format="1">
|
<glyph name="a" format="1">
|
||||||
|
@ -300,6 +300,22 @@ class TestGLIF2(unittest.TestCase):
|
|||||||
self.assertRaises(GlifLibError, self.pyToGLIF, py)
|
self.assertRaises(GlifLibError, self.pyToGLIF, py)
|
||||||
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
||||||
|
|
||||||
|
def testUnicodes_hex_present(self):
|
||||||
|
"""Test that a present <unicode> element must have a
|
||||||
|
'hex' attribute; by testing that an invalid <unicode>
|
||||||
|
element raises an appropriate error.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# illegal
|
||||||
|
glif = """
|
||||||
|
<glyph name="a" format="1">
|
||||||
|
<unicode />
|
||||||
|
<outline>
|
||||||
|
</outline>
|
||||||
|
</glyph>
|
||||||
|
"""
|
||||||
|
self.assertRaises(GlifLibError, self.glifToPy, glif)
|
||||||
|
|
||||||
def testNote(self):
|
def testNote(self):
|
||||||
glif = """
|
glif = """
|
||||||
<glyph name="a" format="2">
|
<glyph name="a" format="2">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user