(self)
| 37 | with pytest.raises(TypeError): |
| 38 | Vec3D("a", "b", "c") |
| 39 | def test_Vec3D_initialization(self): |
| 40 | v = Vec3D(1.0, 2.0, 3.0) |
| 41 | w = Vec3D(v) |
| 42 | assert isinstance(w, Vec3D), "Can not create Vec3D instance." |
| 43 | assert w.r == [1.0, 2.0, 3.0], "Vec3D is not initialized correctly." |
| 44 | assert id(v) != id(w), "Copy constructor did not return new object." |
| 45 | |
| 46 | class Test___getitem__(): |
| 47 | def test_no_integer_index(self, v1): |