Skip to content

Commit

Permalink
clarify test
Browse files Browse the repository at this point in the history
  • Loading branch information
ohnorobo committed Jul 4, 2024
1 parent 578a093 commit 8ca302e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def test_normalizing(self):
psf = 'M 0,0 L 340,-10 L 100,100 L 200,0'
self.assertTrue(parse_path(path).d() in (ps, psf))

def test_d_roundtrip(self):
# check that reading and then outputting a d-string does not introduce floating point error noise
d = "M 70.63,10.42 C 0.11,0.33 -0.89,2.09 -1.54,2.45 C -4.95,2.73 -17.52,7.24 -39.46,11.04"
path = parse_path(d)
self.assertEqual(path.d(), d)
def test_floating_point_errors(self):
# Check that reading and then outputting a d-string
# does not introduce floating point error noise.
path = "M 70.63,10.42 C 0.11,0.33 -0.89,2.09 -1.54,2.45 C -4.95,2.73 -17.52,7.24 -39.46,11.04"
self.assertTrue(parse_path(path).d(), path)


if __name__ == '__main__':
Expand Down

0 comments on commit 8ca302e

Please sign in to comment.