From 6e5951045292fa273bb0e15f4a3833acd2a31f50 Mon Sep 17 00:00:00 2001 From: jdegenstein Date: Thu, 4 Jan 2024 10:40:25 -0600 Subject: [PATCH] test_build_common.py -> add xor (^) test for operator returning location --- tests/test_build_common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_build_common.py b/tests/test_build_common.py index 3a9b170e..e81587ba 100644 --- a/tests/test_build_common.py +++ b/tests/test_build_common.py @@ -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):