test for * operator
(self)
| 70 | self.assertEqual((x - y).component(2), 2) |
| 71 | |
| 72 | def test_mul(self): |
| 73 | """ |
| 74 | test for * operator |
| 75 | """ |
| 76 | x = Vector([1, 2, 3]) |
| 77 | a = Vector([2, -1, 4]) # for test of dot-product |
| 78 | b = Vector([1, -2, -1]) |
| 79 | self.assertEqual((x * 3.0).__str__(), "(3.0,6.0,9.0)") |
| 80 | self.assertEqual((a * b), 0) |
| 81 | |
| 82 | def test_zeroVector(self): |
| 83 | """ |