Add unittests for previous commit

This commit is contained in:
Eduard Braun 2016-08-29 02:28:02 +02:00
parent d477518188
commit ff7a45d136
2 changed files with 15 additions and 0 deletions

View file

@ -1222,6 +1222,13 @@ class GroupNoCreation(unittest.TestCase):
self.assertEqual(doc.getElementsByTagName('g').length, 0,
'Created a <g> for a run of elements having dissimilar attributes')
class GroupNoCreationForTspan(unittest.TestCase):
def runTest(self):
doc = scour.scourXmlFile('unittests/group-no-creation-tspan.svg',
scour.parse_args(['--create-groups']))
self.assertEqual(doc.getElementsByTagName('g').length, 0,
'Created a <g> for a run of <tspan>s that are not allowed as children according to content model')
class DoNotCommonizeAttributesOnReferencedElements(unittest.TestCase):
def runTest(self):
doc = scour.scourXmlFile('unittests/commonized-referenced-elements.svg')