test for + operator
(self)
| 50 | self.assertAlmostEqual(x.eulidLength(), 2.236, 3) |
| 51 | |
| 52 | def test_add(self): |
| 53 | """ |
| 54 | test for + operator |
| 55 | """ |
| 56 | x = Vector([1, 2, 3]) |
| 57 | y = Vector([1, 1, 1]) |
| 58 | self.assertEqual((x + y).component(0), 2) |
| 59 | self.assertEqual((x + y).component(1), 3) |
| 60 | self.assertEqual((x + y).component(2), 4) |
| 61 | |
| 62 | def test_sub(self): |
| 63 | """ |