Exemplo n.º 1
0
 def test_set_value(self):
     a = Animate(debug=True)
     a.set_value('0;1;2', 'linear', '0', '0 0 0 0', 0, 0, 0)
     self.assertEqual(a.tostring(),
                      '<animate by="0" calcMode="linear" from="0" ' \
                      'keySplines="0 0 0 0" keyTimes="0" to="0" '\
                      'values="0;1;2" />')
Exemplo n.º 2
0
 def test_set_value(self):
     a = Animate(debug=True)
     a.set_value('0;1;2', 'linear', '0', '0 0 0 0', 0, 0, 0)
     self.assertEqual(a.tostring(),
                      '<animate by="0" calcMode="linear" from="0" ' \
                      'keySplines="0 0 0 0" keyTimes="0" to="0" '\
                      'values="0;1;2" />')
Exemplo n.º 3
0
 def test_values_int(self):
     s = Animate(values=(3,), debug=True)
     self.assertEqual(s.tostring(), '<animate values="3" />')
Exemplo n.º 4
0
 def test_values_list(self):
     s = Animate(values=[1, 2, 3], debug=True)
     self.assertEqual(s.tostring(), '<animate values="1;2;3" />')
Exemplo n.º 5
0
 def test_freeze(self):
     a = Animate(debug=True)
     a.freeze()
     self.assertEqual(a.tostring(), '<animate fill="freeze" />')
Exemplo n.º 6
0
 def test_constructor(self):
     a = Animate('x', debug=True)
     self.assertEqual(a.tostring(), '<animate attributeName="x" />')
Exemplo n.º 7
0
 def test_values_int(self):
     s = Animate(values=(3, ), debug=True)
     self.assertEqual(s.tostring(), '<animate values="3" />')
Exemplo n.º 8
0
 def test_values_list(self):
     s = Animate(values=[1, 2, 3], debug=True)
     self.assertEqual(s.tostring(), '<animate values="1;2;3" />')
Exemplo n.º 9
0
 def test_freeze(self):
     a = Animate(debug=True)
     a.freeze()
     self.assertEqual(a.tostring(), '<animate fill="freeze" />')
Exemplo n.º 10
0
 def test_constructor(self):
     a = Animate('x', debug=True)
     self.assertEqual(a.tostring(), '<animate attributeName="x" />')
Exemplo n.º 11
0
 def test_values_colors(self):
     s = Animate(values='#000000;#0000ff;#00ff00;#ff0000', debug=True)
     self.assertEqual(s.tostring(), '<animate values="#000000;#0000ff;#00ff00;#ff0000" />')