def __init__(self, command, node, canvasContext, rootTree): Element.__init__(self) self.node = node self.command = command self.canvasContext = canvasContext self.rootTree = rootTree self.gradientHelper = GradientHelper(self)
class TestSvgElement(unittest.TestCase): def setUp(self): self.element = Element() self.effect = Effect() self.document = self.effect.parse( "TestFiles/unit_test_svg_element.svg") self.node = self.effect.document.getroot() def testAttrWithNs(self): self.element.node = self.node returnValue = self.element.attr("width", "ns") self.assertEqual(returnValue, "12cm") def testAttrWithoutNs(self): self.element.node = self.node returnValue = self.element.attr("width") self.assertEqual(returnValue, "12cm")
class TestSvgElement(unittest.TestCase): def setUp(self): self.element = Element() self.effect = Effect() self.document = self.effect.parse("TestFiles/unit_test_svg_element.svg") self.node = self.effect.document.getroot() def testAttrWithNs(self): self.element.node = self.node returnValue = self.element.attr("width", "ns") self.assertEqual(returnValue, "12cm") def testAttrWithoutNs(self): self.element.node = self.node returnValue = self.element.attr("width") self.assertEqual(returnValue, "12cm")
def setUp(self): self.element = Element() self.effect = Effect() self.document = self.effect.parse( "TestFiles/unit_test_svg_element.svg") self.node = self.effect.document.getroot()
def __init__(self, command, node, canvasContext, root): Element.__init__(self) self.command = command self.node = node self.canvasContext = canvasContext self.root = root
def setUp(self): self.element = Element() self.effect = Effect() self.document = self.effect.parse("TestFiles/unit_test_svg_element.svg") self.node = self.effect.document.getroot()