Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_normalizeGLIF_image_everything(self):
element = ET.fromstring(
"<img color="1,0,0,.5">")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(
writer.getText(),
'<img color="1,0,0,0.5">')
def test_normalizeGLIF_guideline_everything(self):
element = ET.fromstring(
"")
writer = XMLWriter(declaration=None)
_normalizeGlifGuideline(element, writer)
self.assertEqual(
writer.getText(),
'')
def test_normalizeGLIF_advance_width(self):
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_advance_height(self):
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
element = ET.fromstring('')
writer = XMLWriter(declaration=None)
_normalizeGlifAdvance(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_image_empty(self):
element = ET.fromstring("<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_anchor_no_y(self):
element = ET.fromstring(
"")
writer = XMLWriter(declaration=None)
_normalizeGlifAnchor(element, writer)
self.assertEqual(writer.getText(), '')
element = ET.fromstring(
"")
writer = XMLWriter(declaration=None)
_normalizeGlifAnchor(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_outline_format1_empty(self):
outline = ""
element = ET.fromstring(outline)
writer = XMLWriter(declaration=None)
_normalizeGlifOutlineFormat1(element, writer)
self.assertEqual(writer.getText(), '')
outline = "\n"
element = ET.fromstring(outline)
writer = XMLWriter(declaration=None)
_normalizeGlifOutlineFormat1(element, writer)
self.assertEqual(writer.getText(), '')
outline = "\n\t\n\t\n"
element = ET.fromstring(outline)
writer = XMLWriter(declaration=None)
_normalizeGlifOutlineFormat1(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_image_no_color(self):
element = ET.fromstring(
"<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(
writer.getText(),
'<img>')
def test_normalizeGLIF_anchor_everything(self):
element = ET.fromstring(
"")
writer = XMLWriter(declaration=None)
_normalizeGlifAnchor(element, writer)
self.assertEqual(
writer.getText(),
'')
def test_normalizeFontInfoPlist_guidelines_horizontal_x_is_zero(self):
# Actually an horizontal guide
element = ET.fromstring("")
writer = XMLWriter(declaration=None)
_normalizeGlifGuideline(element, writer)
self.assertEqual(writer.getText(), '')