Changed the tests to not expect a valueorrer when having a 0 radius, but add two assertEquals so the number of Circles and Lines should be correct

This commit is contained in:
Alex Verschoot 2025-11-16 16:15:13 +01:00
parent dc90a4b15a
commit c7034202f3

View file

@ -183,7 +183,7 @@ class BuildLineTests(unittest.TestCase):
self.assertEqual(len(p.edges().filter_by(GeomType.CIRCLE)), 2) self.assertEqual(len(p.edges().filter_by(GeomType.CIRCLE)), 2)
self.assertEqual(len(p.edges().filter_by(GeomType.LINE)), 3) self.assertEqual(len(p.edges().filter_by(GeomType.LINE)), 3)
with self.assertRaises(ValueError): with BuildLine(Plane.YZ):
p = FilletPolyline( p = FilletPolyline(
(0, 0), (0, 0),
(10, 0), (10, 0),
@ -192,6 +192,9 @@ class BuildLineTests(unittest.TestCase):
radius=(1, 2, 3, 0), radius=(1, 2, 3, 0),
close=True, close=True,
) )
self.assertEqual(len(p.edges().filter_by(GeomType.CIRCLE)), 3)
self.assertEqual(len(p.edges().filter_by(GeomType.LINE)), 4)
with self.assertRaises(ValueError): with self.assertRaises(ValueError):
p = FilletPolyline( p = FilletPolyline(