Add unittests for previous commit
This commit is contained in:
parent
d477518188
commit
ff7a45d136
2 changed files with 15 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
8
unittests/group-no-creation-tspan.svg
Normal file
8
unittests/group-no-creation-tspan.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg height="100" width="100" xmlns="http://www.w3.org/2000/svg" >
|
||||
<text>
|
||||
<tspan x="10" y="30" style="font-family:sans-serif">text1</tspan>
|
||||
<tspan x="10" y="50" style="font-family:sans-serif">text2</tspan>
|
||||
<tspan x="10" y="70" style="font-family:sans-serif">text3</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 350 B |
Loading…
Add table
Add a link
Reference in a new issue