Exemple #1
0
 def test_set_timing(self):
     s = Set(debug=True)
     s.set_timing('indefinite', 'indefinite', 'indefinite', 'media',
                  'media', 'always', 'indefinite', 'indefinite')
     self.assertEqual(s.tostring(), '<set begin="indefinite" dur="indefinite" ' \
                     'end="indefinite" max="media" min="media" ' \
                     'repeatCount="indefinite" repeatDur="indefinite" restart="always" />')
Exemple #2
0
 def test_set_event(self):
     s = Set(debug=True)
     s.set_event('test1', 'test2', 'test3', 'test4')
     self.assertEqual(
         s.tostring(),
         '<set onbegin="test1" onend="test2" onload="test4" onrepeat="test3" />'
     )
Exemple #3
0
 def test_freeze(self):
     s = Set(debug=True)
     s.freeze()
     self.assertEqual(s.tostring(), '<set fill="freeze" />')
Exemple #4
0
 def test_set_timing_1s(self):
     s = Set(debug=True)
     s.set_timing('1s')
     result = s.tostring()
     self.assertEqual(result, '<set begin="1s" />')
Exemple #5
0
 def test_set_target(self):
     s = Set(debug=True)
     s.set_target('x', 'XML')
     self.assertEqual(s.tostring(),
                      '<set attributeName="x" attributeType="XML" />')
Exemple #6
0
 def test_set_href(self):
     s = Set(href='#test', debug=True)
     self.assertEqual(s.tostring(), '<set xlink:href="#test" />')
Exemple #7
0
 def test_constructor(self):
     s = Set(debug=True)
     self.assertEqual(s.tostring(), '<set />')