Fix Issue 479669: Handle empty styl elements
This commit is contained in:
parent
99dfb0f819
commit
7e8d777639
3 changed files with 20 additions and 6 deletions
10
testscour.py
10
testscour.py
|
|
@ -957,6 +957,16 @@ class EnsurePreserveWhitespaceOnNonTextElements(unittest.TestCase):
|
|||
self.assertEquals( s.count('\n'), 5,
|
||||
'Did not properly preserve whitespace on elements even if they were not textual')
|
||||
|
||||
class HandleEmptyStyleElement(unittest.TestCase):
|
||||
def runTest(self):
|
||||
try:
|
||||
styles = scour.scourXmlFile('unittests/empty-style.svg').getElementsByTagNameNS(SVGNS, 'style')
|
||||
fail = len(styles) != 1
|
||||
except AttributeError:
|
||||
fail = True
|
||||
self.assertEquals( fail, False,
|
||||
'Could not handle an empty style element')
|
||||
|
||||
# TODO; write a test for embedding rasters
|
||||
# TODO: write a test for --disable-embed-rasters
|
||||
# TODO: write tests for --keep-editor-data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue