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

Method test_equal_components

test/python/test_Vec3D.py:169–174  ·  view source on GitHub ↗
(self, v1)

Source from the content-addressed store, hash-verified

167 with pytest.raises(TypeError):
168 v1 == "a"
169 def test_equal_components(self, v1):
170 ve = Vec3D(v1x, v1y, v1z)
171 assert id(v1) != id(ve), "Test Vec3Ds are identical."
172 assert (v1 == ve) == (
173 v1[0] == ve[0] and v1[1] == ve[1] and v1[2] == ve[2]), (
174 "Wrong comparison.")
175
176class Test___ne__():
177 def test_wrong_type(self, v1):

Callers

nothing calls this directly

Calls 1

Vec3DClass · 0.85

Tested by

no test coverage detected