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

Method test_nonzero_radius

test/python/test_CutoffFunction.py:153–159  ·  view source on GitHub ↗
(self, c1, cf_type, cf_value, cf_dvalue)

Source from the content-addressed store, hash-verified

151 cutoff_function_values,
152 cutoff_function_dvalues))
153 def test_nonzero_radius(self, c1, cf_type, cf_value, cf_dvalue):
154 c1.setCutoffType(cf_type)
155 f, df = c1.fdf(test_radius)
156 assert f == pytest.approx(cf_value), (
157 "Wrong cutoff function value.")
158 assert df == pytest.approx(cf_dvalue), (
159 "Wrong cutoff derivative value.")
160 def test_nonfloat_argument(self, c1):
161 with pytest.raises(TypeError):
162 c1.fdf("a")

Callers

nothing calls this directly

Calls 2

setCutoffTypeMethod · 0.80
fdfMethod · 0.45

Tested by

no test coverage detected