Remove unreferenced patterns and gradients outside of a defs
This commit is contained in:
parent
2cc9c00ef7
commit
066c627833
7 changed files with 640 additions and 7 deletions
11
testscour.py
11
testscour.py
|
|
@ -120,5 +120,16 @@ class RemoveEmptyGElements(unittest.TestCase):
|
|||
self.assertEquals(len(doc.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'g')), 1,
|
||||
'Did not remove empty g element' )
|
||||
|
||||
class RemoveUnreferencedPattern(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/unreferenced-pattern.svg')
|
||||
self.assertEquals(len(doc.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'pattern')), 0,
|
||||
'Unreferenced pattern not removed' )
|
||||
|
||||
# These tests will fail at present
|
||||
#class RemoveDuplicateGradientStops(unittest.TestCase):
|
||||
# def runTest(self):
|
||||
# doc = scour.scourXmlFile('unittests/duplicate-gradient-stops.svg')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue