Skip to content

Commit

Permalink
test_build_common.py -> add xor (^) test for operator returning location
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Jan 4, 2024
1 parent 46998d8 commit 6e59510
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_build_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ def test_mod(self):
(Wire.make_circle(10) % 0.5).to_tuple(), (0, -1, 0), 5
)

def test_xor(self):
helix_loc = Edge.make_helix(2 * pi, 1, 1) ^ 0
self.assertTupleAlmostEquals(
helix_loc.position.to_tuple(), (1, 0, 0), 5
)
self.assertTupleAlmostEquals(
helix_loc.orientation.to_tuple(), (-45, 0, 180), 5
)

class TestLocations(unittest.TestCase):
def test_polar_locations(self):
Expand Down

0 comments on commit 6e59510

Please sign in to comment.