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_point_attributes_format1_no_name(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('smooth', 'yes'), ('type', 'line'), ('x', 1.0), ('y', 2.5)])
def test_normalizeGlif_point_attributes_format1_no_y(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[])
def test_normalizeGlif_point_attributes_format1_empty_name(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('name', ''), ('smooth', 'yes'), ('type', 'line'), ('x', 1.0), ('y', 2.5)])
def test_normalizeGlif_point_attributes_format1_no_x(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[])
def test_normalizeGlif_point_attributes_format1_subelement(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('x', 1.0), ('y', 2.5)])
def test_normalizeGlif_point_attributes_format1_invalid_x(self):
point = ""
element = ET.fromstring(point)
self.assertIsNone(_normalizeGlifPointAttributesFormat1(element))
def test_normalizeGlif_point_attributes_format1_invalid_y(self):
point = ""
element = ET.fromstring(point)
self.assertIsNone(_normalizeGlifPointAttributesFormat1(element))
[('type', 'qcurve'), ('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('type', 'qcurve'), ('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('x', 1.0), ('y', 2.5)])
point = ""
element = ET.fromstring(point)
self.assertEqual(
def test_normalizeGlif_point_attributes_format1_empty_name(self):
point = ""
element = ET.fromstring(point)
self.assertEqual(
sorted(_normalizeGlifPointAttributesFormat1(element).items()),
[('name', ''), ('smooth', 'yes'), ('type', 'line'), ('x', 1.0), ('y', 2.5)])
def test_normalizeGlif_point_attributes_format1_invalid_y(self):
point = ""
element = ET.fromstring(point)
self.assertIsNone(_normalizeGlifPointAttributesFormat1(element))