Skip to content

Commit

Permalink
Update test_build_line.py -> Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Jun 21, 2024
1 parent 23f6fb9 commit 99863e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_build_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@ def test_jern_arc(self):
with BuildLine() as jern:
j1 = JernArc((1, 0), (0, 1), 1, 90)
self.assertTupleAlmostEquals((jern.line @ 1).to_tuple(), (0, 1, 0), 5)
self.assertAlmostEquals(j1.radius, 1)
self.assertAlmostEquals(j1.length, pi/2)
self.assertAlmostEqual(j1.radius, 1)
self.assertAlmostEqual(j1.length, pi/2)

with BuildLine(Plane.XY.offset(1)) as offset_l:
off1 = JernArc((1, 0), (0, 1), 1, 90)
self.assertTupleAlmostEquals((offset_l.line @ 1).to_tuple(), (0, 1, 1), 5)
self.assertAlmostEquals(off1.radius, 1)
self.assertAlmostEquals(off1.length, pi/2)
self.assertAlmostEqual(off1.radius, 1)
self.assertAlmostEqual(off1.length, pi/2)

plane_iso = Plane(origin=(0, 0, 0), x_dir=(1, 1, 0), z_dir=(1, -1, 1))
with BuildLine(plane_iso) as iso_l:
iso1 = JernArc((0, 0), (0, 1), 1, 180)
self.assertTupleAlmostEquals((iso_l.line @ 1).to_tuple(), (sqrt(2), sqrt(2), 0), 5)
self.assertAlmostEquals(iso1.radius, 1)
self.assertAlmostEquals(iso1.length, pi)
self.assertTupleAlmostEquals((iso_l.line @ 1).to_tuple(), (-sqrt(2), -sqrt(2), 0), 5)
self.assertAlmostEqual(iso1.radius, 1)
self.assertAlmostEqual(iso1.length, pi)

with BuildLine() as l:
l1 = JernArc(start=(0, 0, 0), tangent=(1, 0, 0), radius=1, arc_size=360)
Expand Down

0 comments on commit 99863e8

Please sign in to comment.