Beispiel #1
0
 def test_add_group(self):
     group = Group(id='group')
     subgroup = group.add(Group(id='subgroup'))
     self.assertEqual(group.tostring(),
                      '<g id="group"><g id="subgroup" /></g>')
Beispiel #2
0
 def test_add_subelement(self):
     group = Group(id='group')
     subgroup = Group(id='subgroup')
     group.add(subgroup)
     self.assertEqual(group.tostring(),
                      '<g id="group"><g id="subgroup" /></g>')
Beispiel #3
0
 def test_constructor(self):
     g = Group()
     self.assertEqual(g.tostring(), "<g />")
Beispiel #4
0
 def test_add_group(self):
     group = Group(id='group')
     subgroup = group.add(Group(id='subgroup'))
     self.assertEqual(group.tostring(), '<g id="group"><g id="subgroup" /></g>')
Beispiel #5
0
 def test_add_subelement(self):
     group = Group(id='group')
     subgroup = Group(id='subgroup')
     group.add(subgroup)
     self.assertEqual(group.tostring(), '<g id="group"><g id="subgroup" /></g>')
Beispiel #6
0
 def test_constructor(self):
     g = Group()
     self.assertEqual(g.tostring(), "<g />")