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_no_color(self):
element = ET.fromstring(
"<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(
writer.getText(),
'<img>')
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_image_no_file_name(self):
element = ET.fromstring(
"<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(writer.getText(), '')
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_image_empty(self):
element = ET.fromstring("<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(writer.getText(), '')
def test_normalizeGLIF_image_no_transformation(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_image_no_transformation(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_image_no_file_name(self):
element = ET.fromstring(
"<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(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_image_no_color(self):
element = ET.fromstring(
"<img>")
writer = XMLWriter(declaration=None)
_normalizeGlifImage(element, writer)
self.assertEqual(
writer.getText(),
'<img>')