enable
enable copied to clipboard
Code path for SVG clip-path seems unreachable
This if-clause in enable.savage.svg.document.SVGDocument seems to be always false:
https://github.com/enthought/enable/blob/6b41a429f5cfddc70fa67c3a1025cdd426a98988/enable/savage/svg/document.py#L646
The node object is understood to be an instance of xml.etree.ElementTree.Element. Before enable 4.7.0, (e.g. 4.6.2), it was looping over node.keys():
https://github.com/enthought/enable/blob/248cf7adee2cfc4cdf07646a6f47ce5f13a358df/enable/savage/svg/document.py#L655
node.keys() returns the element attribute names. https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.keys
Upon changing to just node, the if-clause will be checking for containment in the subelements, which will likely be always false.
Discovered through attempt to write a test in #492 that requires the code path.