MCPcopy Create free account
hub / github.com/CompPhysVienna/n2p2 / test_Vec3D_initialization

Method test_Vec3D_initialization

test/python/test_Vec3D.py:39–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
46class Test___getitem__():
47 def test_no_integer_index(self, v1):

Callers

nothing calls this directly

Calls 1

Vec3DClass · 0.85

Tested by

no test coverage detected