Added rmul test

This commit is contained in:
gumyr 2023-07-25 14:52:54 -04:00
parent 50c7254c71
commit bf1a46f853

View file

@ -703,5 +703,15 @@ class OperationsTests(unittest.TestCase):
self.assertEqual(len(p.edges().filter_by(GeomType.CIRCLE)), 5) self.assertEqual(len(p.edges().filter_by(GeomType.CIRCLE)), 5)
class RightMultipleTests(unittest.TestCase):
def test_rmul(self):
c = [Location((1, 2, 3))] * Circle(1)
self.assertTupleAlmostEquals(c[0].position, (1, 2, 3), 6)
def test_rmul_error(self):
with self.assertRaises(ValueError):
[Vector(1, 2, 3)] * Circle(1)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()