Skip to content

Commit

Permalink
Update test_direct_api.py, add a few more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Dec 5, 2023
1 parent d0104f4 commit b14971a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_direct_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,9 @@ def test_location_parameters(self):
with self.assertRaises(TypeError):
Location((10, 20, 30),(30, 20, 10),(10, 20, 30))

with self.assertRaises(TypeError):
Location(Intrinsic.XYZ)

def test_location_repr_and_str(self):
self.assertEqual(
repr(Location()), "(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))"
Expand Down Expand Up @@ -2521,13 +2524,16 @@ def test_rotation_parameters(self):
self.assertVectorAlmostEquals(r.orientation, (10, 20, 30), 5)
r = Rotation(10, Y=20, Z=30)
self.assertVectorAlmostEquals(r.orientation, (10, 20, 30), 5)
r = Rotation((10, 20, 30))
self.assertVectorAlmostEquals(r.orientation, (10, 20, 30), 5)
r = Rotation(10, 20, 30, Intrinsic.XYZ)
self.assertVectorAlmostEquals(r.orientation, (10, 20, 30), 5)
r = Rotation((30, 20, 10), Extrinsic.ZYX)
self.assertVectorAlmostEquals(r.orientation, (10, 20, 30), 5)
with self.assertRaises(TypeError):
Rotation(x=10)

with self.assertRaises(ValueError):
Rotation(1,2,3,4,5)

class TestShape(DirectApiTestCase):
"""Misc Shape tests"""
Expand Down

0 comments on commit b14971a

Please sign in to comment.