test for method euclidean_length()
(self)
| 46 | assert len(x) == 4 |
| 47 | |
| 48 | def test_euclidean_length(self) -> None: |
| 49 | """ |
| 50 | test for method euclidean_length() |
| 51 | """ |
| 52 | x = Vector([1, 2]) |
| 53 | y = Vector([1, 2, 3, 4, 5]) |
| 54 | z = Vector([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) |
| 55 | w = Vector([1, -1, 1, -1, 2, -3, 4, -5]) |
| 56 | assert x.euclidean_length() == pytest.approx(2.236, abs=1e-3) |
| 57 | assert y.euclidean_length() == pytest.approx(7.416, abs=1e-3) |
| 58 | assert z.euclidean_length() == 0 |
| 59 | assert w.euclidean_length() == pytest.approx(7.616, abs=1e-3) |
| 60 | |
| 61 | def test_add(self) -> None: |
| 62 | """ |
nothing calls this directly
no test coverage detected