test for + operator
(self)
| 59 | assert w.euclidean_length() == pytest.approx(7.616, abs=1e-3) |
| 60 | |
| 61 | def test_add(self) -> None: |
| 62 | """ |
| 63 | test for + operator |
| 64 | """ |
| 65 | x = Vector([1, 2, 3]) |
| 66 | y = Vector([1, 1, 1]) |
| 67 | assert (x + y).component(0) == 2 |
| 68 | assert (x + y).component(1) == 3 |
| 69 | assert (x + y).component(2) == 4 |
| 70 | |
| 71 | def test_sub(self) -> None: |
| 72 | """ |