From 4d5e2db71adc7d9e4467d9b07ff72950070b16b1 Mon Sep 17 00:00:00 2001 From: Tim Diller Date: Fri, 24 Oct 2025 10:11:43 -0500 Subject: [PATCH] add test for proper failure of Vector.dot --- test/test_vector.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_vector.py b/test/test_vector.py index 04d7304..d3b0f65 100644 --- a/test/test_vector.py +++ b/test/test_vector.py @@ -11,6 +11,11 @@ class TestVector(unittest.TestCase): self.assertIsInstance(v3, Vector) self.assertEqual(v3.x, v1.x + v2.x) + def test_dot_failure(self): + with self.assertRaises(ValueError): + v1 = Vector(1, 2, 3) + v1.dot(3) + def test_dot_product(self): v1 = Vector(1, 2, 3) v2 = Vector(-3, -2, -1)