More flake fixes.

This commit is contained in:
doom-goober 2020-12-20 12:26:11 -08:00
parent 798eb299e5
commit cebd259a78
2 changed files with 4 additions and 4 deletions

View file

@ -1819,7 +1819,7 @@ def repairStyle(node, options):
if propName in svgAttributes: if propName in svgAttributes:
node.setAttribute(propName, styleMap[propName]) node.setAttribute(propName, styleMap[propName])
del styleMap[propName] del styleMap[propName]
_setStyle(node, styleMap) _setStyle(node, styleMap)
# recurse for our child elements # recurse for our child elements
@ -3999,7 +3999,7 @@ _option_group_optimization.add_option("--disable-style-to-xml",
help="won't convert styles into XML attributes") help="won't convert styles into XML attributes")
_option_group_optimization.add_option("--style", _option_group_optimization.add_option("--style",
action="store", type="string", dest="style_type", default="none", metavar="TYPE", action="store", type="string", dest="style_type", default="none", metavar="TYPE",
help="style type (overrides style-to-xml): none, preserve, inline,"\ help="style type (overrides style-to-xml): none, preserve, inline,"
"attributes (default: %none)") "attributes (default: %none)")
_option_group_optimization.add_option("--disable-group-collapsing", _option_group_optimization.add_option("--disable-group-collapsing",
action="store_false", dest="group_collapse", default=True, action="store_false", dest="group_collapse", default=True,

View file

@ -2217,7 +2217,7 @@ class AttrToStyle(unittest.TestCase):
def runTest(self): def runTest(self):
doc = scourXmlFile('unittests/attr-to-style.svg', doc = scourXmlFile('unittests/attr-to-style.svg',
parse_args(['--style=inline'])) parse_args(['--style=inline']))
line = doc.getElementsByTagName('line')[0] line = doc.getElementsByTagName('line')[0]
self.assertEqual(line.getAttribute('stroke'), '') self.assertEqual(line.getAttribute('stroke'), '')
self.assertEqual(line.getAttribute('marker-start'), '') self.assertEqual(line.getAttribute('marker-start'), '')
@ -2237,7 +2237,7 @@ class StylePreserve(unittest.TestCase):
def runTest(self): def runTest(self):
doc = scourXmlFile('unittests/attr-to-style.svg', doc = scourXmlFile('unittests/attr-to-style.svg',
parse_args(['--style=preserve'])) parse_args(['--style=preserve']))
# First line uses attributes. # First line uses attributes.
line = doc.getElementsByTagName('line')[0] line = doc.getElementsByTagName('line')[0]