Fix a unittest that failed due to the increased accuracy of paths after 29e005bf7b

This commit is contained in:
Eduard Braun 2016-08-31 06:32:05 +02:00
parent 29e005bf7b
commit 21e6c7491b
2 changed files with 2 additions and 2 deletions

View file

@ -877,7 +877,7 @@ class RereferenceForRadialGradient(unittest.TestCase):
class CollapseSamePathPoints(unittest.TestCase):
def runTest(self):
p = scour.scourXmlFile('unittests/collapse-same-path-points.svg').getElementsByTagNameNS(SVGNS, 'path')[0];
self.assertEqual(p.getAttribute('d'), "m100 100l100.12 100.12c14.88 4.88-15.12-5.12 0 0z",
self.assertEqual(p.getAttribute('d'), "m100 100l100.12 100.12c14.877 4.8766-15.123-5.1234 0 0z",
'Did not collapse same path points')
class ScourUnitlessLengths(unittest.TestCase):

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="210" height="210">
<path stroke="yellow" fill="red" d="M100,100 L200.12345,200.12345 C215,205 185,195 200.12,200.12 Z"/>
<path stroke="yellow" fill="red" d="M100,100 L200.12345,200.12345 C215,205 185,195 200.12345,200.12345 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 281 B

Before After
Before After