Skip to content

Commit

Permalink
A test which currently goes into an infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Dec 8, 2023
1 parent f162e7b commit 939c9f2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/classes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,21 @@ def test_segments_4(self):
self.assertEqual(len(p.segments), 2)
self.assertEqual(p.segments[0][0].x, 327)

def test_segments_5(self):
p = GSPath()
p.nodes = [
GSNode((250,2000), "offcurve"),
GSNode((250,1000), "offcurve"),
GSNode((250,900), "curve"),
GSNode((250,500), "offcurve"),
GSNode((250,50), "offcurve"),
GSNode((250,0), "curve"),
GSNode((250,1700), "curve"),
# Yes, this is bad construction but we shouldn't
# infinite loop
]
self.assertEqual(len(p.segments), 3)

def test_bounds(self):
bounds = self.path.bounds
self.assertEqual(bounds.origin.x, 80)
Expand Down

0 comments on commit 939c9f2

Please sign in to comment.