Add unittests for 1cde426009 and 641d2db08a392e4a7df20c700e1accb9cd8d1341
This commit is contained in:
parent
0b5bb5184c
commit
10e687b887
2 changed files with 31 additions and 1 deletions
18
testscour.py
18
testscour.py
|
|
@ -495,12 +495,30 @@ class RemoveStrokeWhenStrokeNone(unittest.TestCase):
|
|||
self.assertEqual(doc.getElementsByTagNameNS(SVGNS, 'path')[0].getAttribute('stroke'), '',
|
||||
'stroke attribute not emptied when no stroke' )
|
||||
|
||||
class KeepStrokeWhenInheritedFromParent(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/stroke-none.svg')
|
||||
self.assertEqual(doc.getElementById('p1').getAttribute('stroke'), 'none',
|
||||
'stroke attribute removed despite a different value being inherited from a parent' )
|
||||
|
||||
class KeepStrokeWhenInheritedByChild(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/stroke-none.svg')
|
||||
self.assertEqual(doc.getElementById('g2').getAttribute('stroke'), 'none',
|
||||
'stroke attribute removed despite it being inherited by a child' )
|
||||
|
||||
class RemoveStrokeWidthWhenStrokeNone(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/stroke-none.svg')
|
||||
self.assertEqual(doc.getElementsByTagNameNS(SVGNS, 'path')[0].getAttribute('stroke-width'), '',
|
||||
'stroke-width attribute not emptied when no stroke' )
|
||||
|
||||
class KeepStrokeWidthWhenInheritedByChild(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/stroke-none.svg')
|
||||
self.assertEqual(doc.getElementById('g3').getAttribute('stroke-width'), '1px',
|
||||
'stroke-width attribute removed despite it being inherited by a child' )
|
||||
|
||||
class RemoveStrokeOpacityWhenStrokeNone(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/stroke-none.svg')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue